<template>
	<view class="addInspectTabsContent">
		<view class="upper">
			<commonNavBar title="新增检查" :showRobot="true"></commonNavBar>
			<view class="step">
				<view v-for="(tabs, index) in stepList" :key="index" @tap="stepActive(index)">
					<view :class="{ 'active': tabs.active }">
						{{ tabs.step }}
					</view>
				</view>
			</view>
		</view>
		<view class="centre">
			<view class="content-container">
				<view class="addInspect" v-show="stepList[0].active">
					<view class="map">
						<image src="@/static/img/mapActive.png" />
						<view style="line-height: normal;">
							<text style="display:block" @tap="companyDimension(addInspectData.companyInfo.LNG_LAT)"
								v-text="isLocationPoint(addInspectData.companyInfo.LNG_LAT) ? '主体已标注' : '主体未标注，请进行主体标注【点击开始主体标注】'"></text>
							<text style="color:red;font-size: 10px;"
								v-show="isLocationPoint(addInspectData.companyInfo.LNG_LAT)"
								v-text="checkDistanceFun() ? this.distanceName : this.distanceName"></text>
						</view>
					</view>
					<view class="content">
						<view class="one">
							<view class="title">
								<view class="left">监管单位信息</view>
							</view>
							<view class="box">
								<view class="text">
									<view class="topicFlex">监管单位：</view>
									<text>{{ addInspectData.superviseInfo.deptName }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">检查时间：</view>
									<text>{{
										addInspectData.superviseInfo.CHECK_TIME == undefined ? inspectTime :
											addInspectData.superviseInfo.CHECK_TIME
									}}
									</text>
								</view>
								<view class="text">
									<view class="topicFlex">执法人员1：</view>
									<!-- <uni-data-select    :value="addInspectData.superviseInfo.checkPerson1Id"
										:localdata="userList"
										@change="lawEnforcementOfficialsOne" :clear="false" :placeholder="'请选择执法人员'"></uni-data-select> -->
									<text>{{ addInspectData.superviseInfo.checkPerson1Name }}</text>
								</view>
								<view class="text">
									<view class="topicFlex" style="margin-left: -17px;">
										<text style="color: red;">*</text>
										执法人员2：
									</view>
									<uni-data-select style="margin-left: 17px;"
										:value="addInspectData.superviseInfo.checkPerson2Id" :localdata="userList"
										@change="lawEnforcementOfficialsTwo" :clear="false"
										:placeholder="'请选择执法人员'"></uni-data-select>
								</view>
							</view>
						</view>
						<view class="two">
							<view class="title">
								<view class="left">生产经营主体信息</view>
							</view>
							<view class="box">
								<view class="text">
									<view class="topicFlex">主体名称：</view>
									<text v-if="addInspectData.companyInfo">{{ addInspectData.companyInfo.COMPANY_NAME
									}}
									</text>
								</view>
								<view class="text">
									<view class="topicFlex">招牌(门头)名称：</view>
									<input class="input-text" placeholder-class="input-text-place"
										v-model="addInspectData.companyInfo.DOOR_HEAD_NAME" placeholder="请输入门头照名称" />
								</view>
								<!--<view class="text">
									<view class="topicFlex">招牌名称：</view>
									<input class="input-text" placeholder-class="input-text-place"  v-model="addInspectData.companyInfo.SIGN_NAME"  placeholder="请输入招牌名称" />
								</view>-->
								<view class="text">
									<view class="topicFlex">经营地址：</view>
									<text v-if="addInspectData.companyInfo">{{ addInspectData.companyInfo.ADDRESS
									}}</text>
								</view>
								<view class="text">
									<view class="topicFlex">主体类别：</view>
									<text v-if="addInspectData.companyInfo">{{ addInspectData.companyInfo.BUSINESS_TYPE
									}}
									</text>
								</view>
								<view class="text">
									<view class="topicFlex">{{
										addInspectData.companyInfo.SUP_PROCESS == 'spxs' ||
											addInspectData.companyInfo.SUP_PROCESS == 'cyfw' ? '经营范围' : '品种明细'
									}}：
									</view>
									<text v-if="addInspectData.companyInfo">{{ addInspectData.companyInfo.BUSINESS_SCOPE
									}}
									</text>
								</view>
								<view class="text">
									<view class="topicFlex">联系方式：</view>
									<input type="number" class="text" placeholder="请输入联系方式"
										v-model="addInspectData.companyInfo.CONTACT_PHONE == 'undefined' ? '' : addInspectData.companyInfo.CONTACT_PHONE"
										style="padding-left:0px;margin-left: 0px;padding-top: 8px;" />
								</view>
								<view class="text">
									<view class="topicFlex">联系人：</view>
									<input type="text" class="text" placeholder="请输入联系人"
										v-model="addInspectData.companyInfo.CONTACT"
										style="padding-left:0px;margin-left: 0px;padding-top: 8px;" />
								</view>
								<view class="text">
									<view class="topicFlex">法人：</view>
									<input type="text" class="text" placeholder="请输入法人"
										v-model="addInspectData.companyInfo.LEGAL_PERSON"
										style="padding-left:0px;margin-left: 0px;padding-top: 8px;" />
								</view>
								<view class="text">
									<view class="topicFlex">法人电话：</view>
									<input type="text" class="text" placeholder="请输入法人电话"
										v-model="addInspectData.companyInfo.LEGAL_PHONE"
										style="padding-left:0px;margin-left: 0px;padding-top: 8px;" />
								</view>
							</view>

						</view>
					</view>
				</view>
				<view class="addInspectContent" v-show="stepList[1].active">
					<view class="positioning">
						<image src="@/static/img/mapActiveTwo.png" />
						<text @tap="companyDimension(addInspectData.companyInfo.LNG_LAT)"
							v-text="isLocationPoint(addInspectData.companyInfo.LNG_LAT) ? '主体已标注' : '主体未标注，请进行主体标注【点击开始主体标注】'"></text>
					</view>
					<view class="box">
						<view class="manage_status_box"
							v-if="addInspectData.companyInfo.SUP_PROCESS == 'spsc' || addInspectData.companyInfo.SUP_PROCESS == 'tssc'">
							<text class="manage_status_title">生产状态：</text>
							<radio-group v-model="addInspectData.companyInfo.MANAGE_STATUS"
								@change="businessStatusRadioChange" class="custom-radio-group">
								<label class="labelRadio"
									:class="{ 'yes': (addInspectData.companyInfo.MANAGE_STATUS === '0') }">
									<radio value="0" :checked="addInspectData.companyInfo.MANAGE_STATUS === '0'" />
									在产
								</label>
								<label class="labelRadio"
									:class="{ 'no': (addInspectData.companyInfo.MANAGE_STATUS === '1') }">
									<radio value="1" :checked="addInspectData.companyInfo.MANAGE_STATUS === '1'" />
									长期停产
								</label>
							</radio-group>
						</view>
						<view class="manage_status_box" v-else>
							<text class="manage_status_title">经营状态：</text>
							<radio-group v-model="addInspectData.companyInfo.MANAGE_STATUS"
								@change="businessStatusRadioChange" class="custom-radio-group">
								<label class="labelRadio"
									:class="{ 'yes': (addInspectData.companyInfo.MANAGE_STATUS === '0') }">
									<radio value="0" :checked="addInspectData.companyInfo.MANAGE_STATUS === '0'" />
									正常
								</label>
								<label class="labelRadio"
									:class="{ 'no': (addInspectData.companyInfo.MANAGE_STATUS === '1') }">
									<radio value="1" :checked="addInspectData.companyInfo.MANAGE_STATUS === '1'" />
									异常
								</label>
							</radio-group>
						</view>
						<view class="abnormal"
							v-show="addInspectData.companyInfo.MANAGE_STATUS === '1' && (addInspectData.companyInfo.SUP_PROCESS == 'spxs' || addInspectData.companyInfo.SUP_PROCESS == 'cyfw')">
							<view class="block">
								<view class="text">
									<view class="topicFlex">异常核查记录：</view>
									<uni-data-select :value="addInspectData.companyInfo.AUDIT_TRAILS"
										:localdata="abnormalCauseList" @change="abnormalCauseChange"
										:clear="false"></uni-data-select>
								</view>
								<!-- 	<view class="text">
									异常原因：
									<uni-data-select :value="addInspectData.companyInfo.ABNORMAL_CAUSE" :localdata="abnormalCauseList"
										@change="abnormalCauseChange" :clear="false"></uni-data-select>
								</view>
								<view class="text">
									异常情况核查记录：
									<input type="text" placeholder="必填项" v-model="addInspectData.companyInfo.AUDIT_TRAILS"
										placeholder-class="placeholder-class" />
								</view> -->
								<!-- 异常状态不选择时间 -->
								<!-- <view class="text" v-show="addInspectData.companyInfo.MANAGE_STATUS != '1'"> -->
								<view class="text">
									<view class="topicFlex">整改时间：</view>
									<picker mode="date" @change="rectificationTimeClick">
										<view style="width: 500rpx;
													height:70rpx;
													font-size: 14px;
													border: 1px solid #e5e5e5;
													box-sizing: border-box;
													border-radius: 4px;
													padding: 0 5px;
													padding-left: 10px;
													position: relative;
													display: flex;
													-webkit-user-select: none;
													user-select: none;
													flex-direction: row;
													align-items: center;
													border-bottom: solid 1px #e5e5e5;">
											<text style="font-size: 19rpx;">
												{{ (addInspectData.companyInfo.RECTIFY_TIME == undefined ||
													addInspectData.companyInfo.RECTIFY_TIME == 'undefined' ||
													addInspectData.companyInfo.RECTIFY_TIME == '') ? '请选择时间' :
													addInspectData.companyInfo.RECTIFY_TIME }}
											</text>
										</view>
									</picker>
								</view>
								<view class="text">
									<view class="topicFlex">检查结果：</view>
									<view class="div">
										<text>重点项发现问题（{{ totalEmphasisNum }}）项</text>
										<text>一般项发现问题（{{ totalGeneralNum }}）项</text>
									</view>
								</view>
								<view class="text">
									<view class="topicFlex">处理结果：</view>
									<text>责令整改</text>
								</view>
							</view>
						</view>
						<view class="three" v-show="addInspectData.companyInfo.MANAGE_STATUS != '1'">
							<view class="box">
								<!-- <view class="text facadePhoto">
									门脸照片：
									<image  style="width:100px;height:100px;border:1px solid #e8e8e8;border-radius: 7px;"  @tap="facadePhotoControl(addInspectData.companyInfo.COMANY_PIC)"
									:src="addInspectData.companyInfo.COMANY_PIC == undefined ? '/static/img/upload.png': baseUrl + addInspectData.companyInfo.COMANY_PIC "   ></image>
								</view> -->
								<view class="text facadePhoto">
									告知页&nbsp;&nbsp;&nbsp;&nbsp;：
									<image style="width:100px;height:100px;border:1px solid #e8e8e8;border-radius: 7px;"
										@tap="showNoticeControl(addInspectData.superviseInfo.informUrl)"
										:src="addInspectData.superviseInfo.informUrl == undefined ? '/static/img/upload.png' : baseUrl + addInspectData.superviseInfo.informUrl">
									</image>
								</view>
							</view>
						</view>
						<!-- <view class="dt">
							<view class="h1">食品销售日常监督检查要点表</view>
							<view class="div">
								<view class="left">食品通用检查项目：</view>
								<view class="right">
									<view>重点发现问题<text>（{{emphasisNum}}）</text>项</view>
									<view>一般发现问题<text>（{{generalNum}}）</text>项</view>
								</view>
							</view>
							<view class="div">
								<view class="left">处理结果：</view>
								<radio-group v-model="addInspectData.companyInfo.PROCESS_RESULTS" @change="handleRadioChange" class="custom-radio-group">
									<label  class="labelRadio " :class="{'yes':addInspectData.companyInfo.PROCESS_RESULTS == '1'}" >
										<radio value="1" :disabled="checkResultStatus == '1'"
											:checked=" (addInspectData.companyInfo.PROCESS_RESULTS == 'undefined') || (addInspectData.companyInfo.PROCESS_RESULTS == '1')" />
										 通过检查
									</label>

									<label  class="labelRadio " :class="{'no':addInspectData.companyInfo.PROCESS_RESULTS == '2'}" >
										<radio value="2"  :disabled="checkResultStatus == '2'"
											:checked="(addInspectData.companyInfo.PROCESS_RESULTS == '2')" />
										 责令整改
									</label>
									<label  class="labelRadio  "   :class="{'no':addInspectData.companyInfo.PROCESS_RESULTS == '3'}">
										<radio value="3" :disabled="checkResultStatus == '2'"
											:checked=" (addInspectData.companyInfo.PROCESS_RESULTS == '3')" />
										 调查处理
									</label>
								</radio-group>
							</view>
							<view class="div" v-show="addInspectData.companyInfo.PROCESS_RESULTS === '2' || addInspectData.companyInfo.PROCESS_RESULTS === '3' ">
								<view class="left">整改时间：</view>
								<view class="right" style="width:  70%;">
									<picker mode="date"  @change="rectificationTimeClick">
										<view style="width: 600rpx;height:30rpx ">
											<text style="font-size: 19rpx;">
											{{(addInspectData.companyInfo.RECTIFY_TIME == undefined || addInspectData.companyInfo.RECTIFY_TIME == 'undefined') ? '请选择时间' : addInspectData.companyInfo.RECTIFY_TIME}}
											</text>
										</view>
									</picker>
								</view>
							</view>
							<view class="div">
								<view class="left">其他需要记录的问题：</view>
								<view class="right">
									<view class="input-container">
										<input type="text" placeholder="请输入" v-model="addInspectData.companyInfo.OTHER_PROBLEM"
											placeholder-class="placeholder-class" />
									</view>
								</view>
							</view>
						</view> -->
						<view class="bottom-tab" :style="{ bottom: '110rpx' }"
							style="position: fixed; width: 100%; left: 0; z-index: 2;">
							<uni-collapse style="background-color: #026DC6;">
								<uni-collapse-item title="检查结果" :show-animation="true" :titleBgColor="'#026DC6'"
									:titleColor="'#ffffff'">
									<view class="content dt">
										<!-- <view class="dt"> -->
										<!-- <view class="h1">食品销售日常监督检查要点表</view> -->
										<view class="div">
											<view class="left">食品通用检查项目：</view>
											<view class="right">
												<!-- <view>重点发现问题<text>（{{emphasisNum}}）</text>项</view>
													<view>一般发现问题<text>（{{generalNum}}）</text>项</view> -->
												<view>重点发现问题<text>（{{ this.addInspectData.companyInfo.MANAGE_STATUS ===
													'0' ? emphasisNum : totalEmphasisNum }}）</text>项</view>
												<view>一般发现问题<text>（{{ this.addInspectData.companyInfo.MANAGE_STATUS ===
													'0' ? generalNum : totalGeneralNum }}）</text>项</view>
											</view>
										</view>
										<view class="div"
											v-if="addInspectData.companyInfo.SUP_PROCESS == 'cyfw' || addInspectData.companyInfo.SUP_PROCESS == 'spxs'">
											<view class="left">检查结果：</view>
											<radio-group v-model="addInspectData.companyInfo.CHECK_RESULTS"
												@change="accordRadioChange" class="custom-radio-group">
												<label class="labelRadio"
													:class="{ 'yes': addInspectData.companyInfo.CHECK_RESULTS == '符合' }">
													<radio value="符合"
														:disabled="hasContentSelect2Or3 || hasContentSelectIs == '1'" />
													符合
												</label>

												<label class="labelRadio"
													:class="{ 'no': addInspectData.companyInfo.CHECK_RESULTS == '基本符合' }">
													<radio value="基本符合" :disabled="hasContentSelect2Or3" />
													基本符合
												</label>
												<label class="labelRadio"
													:class="{ 'no': addInspectData.companyInfo.CHECK_RESULTS == '不符合' }">
													<radio value="不符合" :disabled="hasContentSelect2Or3" />
													不符合
												</label>
												<label class="labelRadio"
													:class="{ 'no': addInspectData.companyInfo.CHECK_RESULTS == '其他' }">
													<radio value="其他" :disabled="hasContentSelect2Or3" />
													其他
												</label>
											</radio-group>
										</view>
										<view class="div">
											<view class="left">处理结果：</view>
											<radio-group v-model="addInspectData.companyInfo.PROCESS_RESULTS"
												@change="handleRadioChange" class="custom-radio-group">
												<label class="labelRadio "
													:class="{ 'yes': addInspectData.companyInfo.PROCESS_RESULTS == '1' }">
													<radio value="1"
														:disabled="checkResultStatus == '1' || checkResultStatus == '3'"
														:checked="(addInspectData.companyInfo.PROCESS_RESULTS == '1')" />
													通过检查
												</label>
												<!-- (addInspectData.companyInfo.PROCESS_RESULTS == 'undefined') || -->
												<label class="labelRadio "
													:class="{ 'no': addInspectData.companyInfo.PROCESS_RESULTS == '2' }">
													<radio value="2"
														:disabled="checkResultStatus == '2' || checkResultStatus == '3'"
														:checked="(addInspectData.companyInfo.PROCESS_RESULTS == '2')" />
													<!-- 责令整改 -->
													{{ supProcess === 'tssc' ? '书面期限整改' : '责令整改' }}
												</label>
												<label class="labelRadio  "
													:class="{ 'no': addInspectData.companyInfo.PROCESS_RESULTS == '3' }">
													<radio value="3"
														:disabled="checkResultStatus == '2' || checkResultStatus == '3'"
														:checked="(addInspectData.companyInfo.PROCESS_RESULTS == '3')" />
													<!-- 调查处理 -->
													{{ supProcess === 'tssc' ? '食品生产经营者立即停止食品生产经营活动' : '调查处理' }}
												</label>
											</radio-group>
										</view>
										<view class="div"
											v-show="addInspectData.companyInfo.PROCESS_RESULTS === '2' || addInspectData.companyInfo.PROCESS_RESULTS === '3'">
											<view class="left">整改时间：</view>
											<view class="right" style="width:  70%;">
												<picker mode="date" @change="rectificationTimeClick">
													<view style="width: 600rpx;height:30rpx ">
														<text style="font-size: 19rpx;">
															{{ (addInspectData.companyInfo.RECTIFY_TIME == undefined ||
																addInspectData.companyInfo.RECTIFY_TIME == 'undefined' ||
																addInspectData.companyInfo.RECTIFY_TIME == '') ? '请选择时间' :
																addInspectData.companyInfo.RECTIFY_TIME }}
														</text>
													</view>
												</picker>
											</view>
										</view>
										<view class="div">
											<view class="left">其他需要记录的问题：</view>
											<view class="right">
												<view class="input-container">
													<input type="text" placeholder="请输入"
														v-model="addInspectData.companyInfo.OTHER_PROBLEM"
														placeholder-class="placeholder-class" />
												</view>
											</view>
										</view>
										<!-- </view> -->
									</view>
								</uni-collapse-item>
							</uni-collapse>
						</view>
						<view class="dd" v-for="(item, index) in rectificationSituationDataList.itemList" :key="index"
							v-show="addInspectData.companyInfo.MANAGE_STATUS != '1'">
							<view class="up">
								<view class="h1">
									{{ item.SERIAL_NUM }}.&nbsp;&nbsp;{{ item.STANDARD_NAME }}
								</view>

								<!-- 是否显示检查指南(不知道pc在哪配置  暂时先全放开了) v-if="data.GUIDE_PRE === '1'" -->
								<view class="titles-right">
									<view class="list">
										<view class="option" @tap="inspectionContentActive(index, 1)"
											:class="{ 'active': item.rightButtonActive == 1 }">
											是
										</view>
										<view class="option" @tap="inspectionContentActive(index, 2)"
											:class="{ 'active': item.rightButtonActive == 2 }">
											否
										</view>
										<view class="option" @tap="inspectionContentActive(index, 3)"
											:class="{ 'active': item.rightButtonActive == 3 }">
											合理缺项
										</view>
									</view>
								</view>
							</view>
							<view class="block">
								<view class="li"
									:class="{ 'float-border': selectedContent == 'content' + index + ':' + dataIndex ? true : false }"
									@tap="contentSelectedStatus(index, dataIndex)"
									v-for="(data, dataIndex) in item.contentList" :key="dataIndex">
									<view class="titles">
										<view class="titles-left">
											<text :class="{ 'text-red': data.RISK_COUNT > 0 }"
												v-show="data.IMPORTENT_ITEM === '2'">*</text>
											<view class="text" :class="{ 'text-red': data.RISK_COUNT > 0 }">
												{{ item.SERIAL_NUM }}.{{ data.SERIAL_NUM }}.&nbsp;&nbsp;{{
													data.CHECK_CONTENT }}
											</view>
										</view>
										<!-- 是否显示检查指南(不知道pc在哪配置  暂时先全放开了) v-if="data.GUIDE_PRE === '1'" -->
										<view class="titles-right">
											<view class="guide"
												v-if="checkExist(data.CHECK_BASIS, data.CHECK_GUIDE, data.CHECK_METHOD, data.CHECK_PROBLEM)"
												@tap="inspectionGuidelines(data.CHECK_BASIS, data.CHECK_GUIDE, data.CHECK_METHOD, data.CHECK_PROBLEM)">
												<image src="/static/img/questionMark.png" mode=""></image>
												检查指南
												<!-- <view class="triangle"></view> -->
											</view>
											<!-- <view class="guide" v-if="data.RISK_COUNT > 0"  @tap="showRiskContent(data.ID)">
												<image src="/static/img/questionMark.png" mode=""></image>
												风险提示
											</view> -->
										</view>
									</view>
									<view class="optionList">
										<view class="list">
											<view class="option" :class="{ 'active': data.SELECTION == 1 }" @tap="inspectionContentToggleActive(
												index,
												dataIndex,
												'是',
												item.TEMPLATE_ID,
												item.ID,
												data.ID,
												1
											)">
												是
											</view>
											<view class="option" :class="{ 'active': data.SELECTION == 2 }" @tap="inspectionContentToggleActive(
												index,
												dataIndex,
												'否',
												item.TEMPLATE_ID,
												item.ID,
												data.ID,
												2
											)">
												否
											</view>
											<!-- || addInspectData.companyInfo.SUP_PROCESS == 'spsc'  || addInspectData.companyInfo.SUP_PROCESS == 'tssc' -->
											<view class="option" v-if="data.MISSING_ITEM === '1'"
												:class="{ 'active': data.SELECTION == 3 }" @tap="inspectionContentToggleActive(
													index,
													dataIndex,
													'合理缺项',
													item.TEMPLATE_ID,
													item.ID,
													data.ID,
													3
												)">
												合理缺项
											</view>
										</view>
										<view class="case">
											<view v-if="data.SELECTION == 2">
												<view class="h2">问题描述 ：</view>
												<view class="no-realy-content">

													<uni-data-select
														v-if="data.PROBLEM_PRE_TYPE == 0 && data.checkProblemList.length > 0"
														:value="data.PROBLEM_CONTENT" :localdata="data.checkProblemList"
														@change="problemDescriptionChange($event, index, dataIndex,
															item.TEMPLATE_ID,
															item.ID,
															data.ID, 2, data.PROBLEM_PRE_TYPE)" :clear="false"></uni-data-select>

													<rudon-multiSelector
														v-if="data.PROBLEM_PRE_TYPE == 1 && data.checkProblemList.length > 0"
														:value="data.PROBLEM_CONTENT" welcome="请选择"
														:is_using_slot="false" :is_using_icon="false"
														:localdata="data.checkProblemList" @change="problemDescriptionChange(
															$event,
															index, dataIndex,
															item.TEMPLATE_ID,
															item.ID,
															data.ID, 2, data.PROBLEM_PRE_TYPE)" :clear="false">
													</rudon-multiSelector>

													<view class="content-upload-btn"
														v-if="data.PROBLEM_FILE == undefined && data.SELECTION == 2"
														@tap="uploadContentFile(index, dataIndex,
															item.ID,
															data.ID)">上传文件</view>
													<view class="content-upload-btn-realy"
														v-if="data.PROBLEM_FILE != undefined"
														@tap="showContentFileControls(index, dataIndex, item.ID, data.ID, data.PROBLEM_FILE)">
														点击查看</view>
												</view>

												<textarea maxlength="2000" class="problem" placeholder="请输入备注"
													v-model="data.PROBLEM_CONTENT_INPUT"
													placeholder-class="placeholder-class" @input="saveInspectionProblemContent($event, index, dataIndex, item.TEMPLATE_ID,
														item.ID,
														data.ID, 2)" v-if="data.PROBLEM_CONTENT == '自定义备注' || data.checkProblemList.length === 0" />
											</view>
											<view v-if="data.SELECTION == 3">
												<view class="h2">检查说明：</view>
												<!-- <uni-data-select
													:value="data.MISSING_ITEM_CONTENT"
													:localdata="inspectionInstructionsList"
													@change="inspectionInstructionsChange($event, index, dataIndex,
													item.TEMPLATE_ID,
													item.ID,
													data.ID,3)"
													:clear="false"
												></uni-data-select>
												<input type="text" class="inspect" placeholder="请输入备注信息" @input="saveMissingItemContent($event,index,dataIndex,item.TEMPLATE_ID,
													item.ID,
													data.ID,3)" v-model="data.MISSING_ITEM_CONTENT_INPUT"
													placeholder-class="placeholder-class-inspect" v-if="data.MISSING_ITEM_CONTENT == '自定义备注'" /> -->
												<uni-data-select v-model="data.MISSING_ITEM_CONTENT"
													:localdata="data.checkMissingList" :clear="false"
													v-if="data.checkMissingList.length > 0"></uni-data-select>
												<textarea maxlength="2000" class="problem" placeholder="请输入备注信息" @input="saveMissingItemContent($event, index, dataIndex, item.TEMPLATE_ID,
													item.ID,
													data.ID, 3)" v-model="data.MISSING_ITEM_CONTENT_INPUT" placeholder-class="placeholder-class-inspect"
													v-else />
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 2023-12-5 新增 -->
					<view class="socialResponsibility"
						v-show="addInspectData.IS_LIABILITY === '0' && addInspectData.companyInfo.MANAGE_STATUS != '1'">
						<view class="title">{{ this.socialResponsibilityData.templateName }}</view>
						<view class="list">
							<view class="li" v-for="(e, i) in this.socialResponsibilityData.itemList" :key="i">
								<view class="h1"
									style="display: flex; justify-content: space-between; align-items: center;">
									<view>{{ e.SERIAL_NUM }}.&nbsp;&nbsp;{{ e.STANDARD_NAME }}</view>
									<view class="global-options">
										<view class="option" :class="{ active: isAllSelected(e, 1) }"
											@tap="setAllSocialSubItems(i, 1)">是</view>
										<view class="option" :class="{ active: isAllSelected(e, 2) }"
											@tap="setAllSocialSubItems(i, 2)">否</view>
										<view class="option"
											v-if="e.contentList.some(es => es.MISSING_ITEM === '1') || addInspectData.companyInfo.SUP_PROCESS == 'spsc' || addInspectData.companyInfo.SUP_PROCESS == 'tssc'"
											:class="{ active: isAllSelected(e, 3) }" @tap="setAllSocialSubItems(i, 3)">
											合理缺项</view>
									</view>
								</view>
								<view class="box">
									<view class="row" v-for="(es, is) in e.contentList" :key="is"
										:class="{ 'float-border': socialResponsibilitySelectedContent == 'content' + i + ':' + is ? true : false }"
										@tap="socialResponsibilityRow(i, is)">
										<view class="titles">
											<text :class="{ 'text-red': es.RISK_COUNT > 0 }"
												v-show="es.IMPORTENT_ITEM === '2'">*</text>
											<view class="text" :class="{ 'text-red': es.RISK_COUNT > 0 }">
												{{ e.SERIAL_NUM }}.{{ es.SERIAL_NUM }}.&nbsp;&nbsp;{{ es.CHECK_CONTENT
												}}
											</view>
										</view>

										<view class="optionList">
											<view class="list">
												<view class="option" :class="{ 'active': es.SELECTION == 1 }" @tap="socialResponsibilityRowOption(
													i,
													is,
													'是',
													e.TEMPLATE_ID,
													e.ID,
													es.ID,
													1
												)">
													是
												</view>
												<view class="option" :class="{ 'active': es.SELECTION == 2 }" @tap="socialResponsibilityRowOption(
													i,
													is,
													'否',
													e.TEMPLATE_ID,
													e.ID,
													es.ID,
													2
												)">
													否
												</view>
												<view class="option"
													v-if="es.MISSING_ITEM === '1' || addInspectData.companyInfo.SUP_PROCESS == 'spsc' || addInspectData.companyInfo.SUP_PROCESS == 'tssc'"
													:class="{ 'active': es.SELECTION == 3 }" @tap="socialResponsibilityRowOption(
														i,
														is,
														'合理缺项',
														e.TEMPLATE_ID,
														e.ID,
														es.ID,
														3
													)">
													合理缺项
												</view>
											</view>
											<view class="case">
												<!-- <view v-if="es.SELECTION == 3">
													<view class="h2">合理缺项：</view>
													<uni-data-select v-model="es.MISSING_ITEM_CONTENT"
														:localdata="es.checkMissingList"
														:clear="false"
														v-if="es.checkMissingList.length > 0"></uni-data-select>
												</view> -->
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="addInspectTrisk" v-show="stepList[2].active">
					<view class="positioning">
						<image src="@/static/img/mapActiveTwo.png" />
						<text @tap="companyDimension(addInspectData.companyInfo.LNG_LAT)"
							v-text="isLocationPoint(addInspectData.companyInfo.LNG_LAT) ? '主体已标注' : '主体未标注，请进行主体标注【点击开始主体标注】'"></text>
					</view>
					<view class="box">
						<view class="div">
							<view class="titles">主体资格</view>
							<view class="state">
								<view class="yes" v-if="riskWarningData.subjectQualification === '0'">
									未发现
								</view>
								<view class="no" v-else>
									有风险
									<image src="/static/img/no.png"></image>
								</view>
							</view>
							<view class="details">
								<text v-if="riskWarningData.subjectQualification === '0'">-</text>
								<text v-else @tap="addInspectriskLook(0)">详情</text>
							</view>
						</view>
						<view class="div">
							<view class="titles">主体标注</view>
							<view class="state">
								<view class="yes" v-if="riskWarningData.bodyCallouts === '0'">
									未发现
								</view>
								<view class="no" v-else>
									有风险
									<image src="/static/img/no.png"></image>
								</view>
							</view>
							<view class="details">
								<text v-if="riskWarningData.bodyCallouts === '0'">-</text>
								<text v-else @tap="addInspectriskLook(1)">详情</text>
							</view>
						</view>
						<view class="div">
							<view class="titles">抽检信息</view>
							<view class="state">
								<view class="yes" v-if="riskWarningData.foodSafe === '0'">
									未发现
								</view>
								<view class="no" v-else>
									有风险
									<image src="/static/img/no.png"></image>
								</view>
							</view>
							<view class="details">
								<text v-if="riskWarningData.foodSafe === '0'">-</text>
								<text v-else @tap="addInspectriskLook(2)">详情</text>
							</view>
						</view>
						<view class="div">
							<view class="titles">处罚信息</view>
							<view class="state">
								<view class="yes" v-if="riskWarningData.punishInfo === '0'">
									未发现
								</view>
								<view class="no" v-else>
									有风险
									<image src="/static/img/no.png"></image>
								</view>
							</view>
							<view class="details">
								<text v-if="riskWarningData.punishInfo === '0'">-</text>
								<text v-else @tap="addInspectriskLook(3)">详情</text>
							</view>
						</view>
						<view class="div">
							<view class="titles">投诉举报</view>
							<view class="state">
								<view class="yes" v-if="riskWarningData.complaintsReport === '0'">
									未发现
								</view>
								<view class="no" v-else>
									有风险
									<image src="/static/img/no.png"></image>
								</view>
							</view>
							<view class="details">
								<text v-if="riskWarningData.complaintsReport === '0'">-</text>
								<text v-else @tap="addInspectriskLook(4)">详情</text>
							</view>
						</view>
						<view class="div">
							<view class="titles">舆情风险</view>
							<view class="state">
								<view class="yes" v-if="riskWarningData.opinionRisk === '0'">
									未发现
								</view>
								<view class="no" v-else>
									有风险
									<image src="/static/img/no.png"></image>
								</view>
							</view>
							<view class="details">
								<text v-if="riskWarningData.opinionRisk === '0'">-</text>
								<text v-else @tap="addInspectriskLook(5)">详情</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="fixed">
				<button class="determine" @tap="savePopup('2')">提交</button>
				<button class="cancellation" @tap="savePopup('1')">临时保存</button>
			</view>
		</view>
		<!-- 基础信息-告知单 -->
		<uni-popup ref="noticeForm" type="bottom">
			<view class="noticeFormPopupContent">
				<view class="title">电子告知单</view>
				<view class="h1Title"
					v-if="addInspectData.companyInfo.SUP_PROCESS == 'tssc' || addInspectData.companyInfo.SUP_PROCESS == 'spsc'">
					食品生产日常监督检查</view>
				<view class="h1Title" v-else>食品销售经营日常监督检查</view>
				<view class="h2Ttitle">告知页</view>
				<view class="box">
					<view class="div">
						<view class="titles">被检查单位：</view>
						<text class="value">{{ addInspectData.companyInfo.COMPANY_NAME }}</text>
					</view>
					<view class="div">
						<view class="titles">地址：</view>
						<text class="value">{{ addInspectData.companyInfo.ADDRESS }}</text>
					</view>
					<view class="div">
						<view class="titles">
							检查人员1
							<!-- <text>执法证件编号：</text> -->
						</view>
						<uni-data-select :value="addInspectData.superviseInfo.checkPerson1Id" :disabled="true"
							:localdata="userList" :clear="false" :placeholder="'请选择检查人员'"></uni-data-select>
					</view>
					<view class="div">
						<view class="titles">
							检查人员2
							<!-- <text>执法证件编号：</text> -->
						</view>
						<uni-data-select :value="addInspectData.superviseInfo.checkPerson2Id" :disabled="true"
							:localdata="userList" :clear="false" :placeholder="'请选择检查人员'"></uni-data-select>
					</view>
					<view class="div">
						<view class="titles">检查时间：</view>
						<text class="value">{{
							addInspectData.superviseInfo.CHECK_TIME == undefined ? inspectTime :
								addInspectData.superviseInfo.CHECK_TIME
						}}
						</text>
					</view>
					<view class="div">
						<view class="titles">检查地点：</view>
						<text class="value">{{ addInspectData.companyInfo.ADDRESS }}</text>
					</view>
					<view class="div">
						<view class="titles">告知事项：</view>
						<view class="textarea">{{ notificationText | notificationFilter(this) }}</view>
					</view>
					<view class="div">
						<view class="titles">
							问：你（单位）
							<text>是否申请回避？</text>
						</view>
						<uni-data-select v-model="applyForAvoidanceValue" :localdata="applyForAvoidanceList"
							:clear="false" :placeholder="'请选择是否回避'"></uni-data-select>
					</view>
					<view class="div">
						<view class="titles">被检查单位签字：</view>
						<view @tap="signatureOne()">点击签字</view>
						<image class="sig-image" v-if="sigOnePic != ''" :src="sigOnePic"></image>
					</view>
					<view class="div">
						<view class="titles">检查人员1签字：</view>
						<view @tap="signatureTwo()">点击签字</view>
						<image class="sig-image" v-if="sigTwoPic != ''" :src="sigTwoPic"></image>
					</view>
					<view class="div">
						<view class="titles">检查人员2签字：</view>
						<view @tap="signatureThree()">点击签字</view>
						<image class="sig-image" v-if="sigThreePic != ''" :src="sigThreePic"></image>
					</view>
				</view>
				<view class="button">
					<button class="determine" @tap="noticeFormDetermine">保存</button>
					<button class="cancellation" @tap="noticeFormCancellation">预览</button>
				</view>
			</view>
		</uni-popup>
		<!-- 任务管理按提示 -->
		<uni-popup ref="taskAssociation" type="bottom">
			<view class="taskAssociationContent">
				<view class="title">任务关联提示</view>
				<view class="box">
					<view class="dd" v-for="(item, index) in taskAssociationList" :key="item.id">
						<view class="subscript">{{ index + 1 }}</view>
						<view>{{ item.title }}</view>
						<label for="">
							<checkbox @tap="taskAssociationChange(item)"></checkbox>
							关联合并
						</label>
					</view>
					<view class="dt">
						*勾选需要关联合并检查任务，提示本次检查
					</view>
				</view>
				<view class="button">
					<button class="determine" @tap="taskAssociationDetermine">任务关联</button>
					<button class="cancellation" @tap="taskAssociationCancellation">不关联</button>
				</view>
			</view>
		</uni-popup>
		<!-- 基础信息-风险提示 -->
		<uni-popup ref="riskWarningPopup" type="bottom" :mask-click="false">
			<view class="riskWarningPopupContent">
				<view class="title">风险提示</view>
				<view class="box">
					<view class="div">
						<view class="titles">主体资格</view>
						<view class="state">
							<view class="yes" v-if="riskWarningData.subjectQualification === '0'">
								未发现
							</view>
							<view class="no" v-else>
								有风险
								<image src="/static/img/no.png"></image>
							</view>
						</view>
						<view class="details">
							<text v-if="riskWarningData.subjectQualification === '0'">-</text>
							<text v-else @tap="addInspectriskLook(0)">详情</text>
						</view>
					</view>
					<view class="div">
						<view class="titles">主体标注</view>
						<view class="state">
							<view class="yes" v-if="riskWarningData.bodyCallouts === '0'">
								未发现
							</view>
							<view class="no" v-else>
								有风险
								<image src="/static/img/no.png"></image>
							</view>
						</view>
						<view class="details">
							<text v-if="riskWarningData.bodyCallouts === '0'">-</text>
							<text v-else @tap="addInspectriskLook(1)">详情</text>
						</view>
					</view>
					<view class="div">
						<view class="titles">抽检信息</view>
						<view class="state">
							<view class="yes" v-if="riskWarningData.foodSafe === '0'">
								未发现
							</view>
							<view class="no" v-else>
								有风险
								<image src="/static/img/no.png"></image>
							</view>
						</view>
						<view class="details">
							<text v-if="riskWarningData.foodSafe === '0'">-</text>
							<text v-else @tap="addInspectriskLook(2)">详情</text>
						</view>
					</view>
					<view class="div">
						<view class="titles">处罚信息</view>
						<view class="state">
							<view class="yes" v-if="riskWarningData.punishInfo === '0'">
								未发现
							</view>
							<view class="no" v-else>
								有风险
								<image src="/static/img/no.png"></image>
							</view>
						</view>
						<view class="details">
							<text v-if="riskWarningData.punishInfo === '0'">-</text>
							<text v-else @tap="addInspectriskLook(3)">详情</text>
						</view>
					</view>
					<view class="div">
						<view class="titles">投诉举报</view>
						<view class="state">
							<view class="yes" v-if="riskWarningData.complaintsReport === '0'">
								未发现
							</view>
							<view class="no" v-else>
								有风险
								<image src="/static/img/no.png"></image>
							</view>
						</view>
						<view class="details">
							<text v-if="riskWarningData.complaintsReport === '0'">-</text>
							<text v-else @tap="addInspectriskLook(4)">详情</text>
						</view>
					</view>
					<view class="div">
						<view class="titles">舆情风险</view>
						<view class="state">
							<view class="yes" v-if="riskWarningData.opinionRisk === '0'">
								未发现
							</view>
							<view class="no" v-else>
								有风险
								<image src="/static/img/no.png"></image>
							</view>
						</view>
						<view class="details">
							<text v-if="riskWarningData.opinionRisk === '0'">-</text>
							<text v-else @tap="addInspectriskLook(5)">详情</text>
						</view>
					</view>
					<view class="div" v-if="riskWarningData.packageSupervision != '0'">
						<view class="titles">包保督导</view>
						<view class="state">
							<view class="no">
								有风险
								<image src="/static/img/no.png"></image>
							</view>
						</view>
						<view class="details">
							<text @tap="addInspectriskLook(6)">详情</text>
						</view>
					</view>
					<view class="buttonBg">
						<!-- <button class="determine" style="position: static" @tap="IAlreadyKnow">我已知晓</button> -->
						<button class="determine" @tap="IAlreadyKnow">我已知晓</button>
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 风险提示-查看详情 -->
		<uni-popup ref="riskReminderDetails" type="bottom">
			<view class="riskReminderDetailsContent">
				<view class="title">风险提示</view>
				<view class="box">
					<view class="illustrate">
						<view class="content" v-for="(item, index) in addInspectriskLookData" :key="index">
							{{ item.text }}
						</view>
					</view>
				</view>
				<view class="closeReturn" @tap="riskReminderDetailsClose">返回</view>
			</view>
		</uni-popup>
		<!-- 检查指南 -->
		<uni-popup ref="inspectionGuidelines" type="bottom">
			<view class="inspectionGuidelinesContent">
				<view class="title">检查指南</view>
				<view class="box">
					<view class="div">
						<view class="titles">
							检查依据
						</view>
						<view class="contents">
							{{ checkBasis }}
						</view>
					</view>
					<view class="div">
						<view class="titles">
							检查方式
						</view>
						<view class="contents">
							{{ checkGuide }}
						</view>
					</view>
					<view class="div">
						<view class="titles">
							检查指南
						</view>
						<view class="contents">
							{{ checkMethod }}
						</view>
					</view>
					<view class="div">
						<view class="titles">
							常见问题
						</view>
						<view class="contents">
							{{ checkProblem }}
						</view>
					</view>
					<view class="closeReturn" @tap="inspectionGuidelinesClose">关闭</view>
				</view>
			</view>
		</uni-popup><!-- 检查项可能存在的风险 -->
		<uni-popup ref="riskTypePopup" type="bottom">
			<view class="inspectionGuidelinesContent">
				<view class="title">可能存在风险</view>
				<view class="box">
					<view class="div" v-for="(item, index) in checkContentRiskList">
						<view class="titles">
							{{ index + 1 }}.
						</view>
						<view class="contents">
							{{ item.TYPE_NAME }}
						</view>
					</view>
					<view class="closeReturn" @tap="riskTypePopupClose">关闭</view>
				</view>
			</view>
		</uni-popup>
		<!-- 提交弹窗 -->
		<uni-popup ref="popupTwo" type="bottom">
			<view class="popupContent">
				<view class="title">确定</view>
				<view class="box">
					提交当前检查？
				</view>
				<view class="button" style="padding-bottom:20px;">
					<button class="determine" @click="determineTwo" :disabled="determineTwoDisabled">确认</button>
					<button class="cancellation" @click="cancellationTwo">返回</button>
				</view>
			</view>
		</uni-popup>
		<!-- 结果记录 -->
		<uni-popup ref="resultLog" type="bottom" :mask-click="false">
			<view class="popupContent" style="padding-bottom: 20px;">
				<view class="title">结果记录</view>
				<view class="box">
					<!-- <view class="box-item">
						<view class="box-item-left">
							<view style="width: 150px;text-align: left;"><text>日常监督检查要点表:</text></view>
							<image :src="yaodianbiao == '' ? '/static/img/no-pic.png' : yaodianbiao" style="width: 100px;height: 100px;" @tap="showImage(yaodianbiao)" ></image>
						</view>
						<text class="btna" @tap="pointsTable">生成检查要点表</text>
					</view> -->

					<view class="box-item" style="margin-top: 10px;">
						<view class="box-item-left">
							<view style="width: 150px;text-align: left;">
								<text>结果记录表:</text>
							</view>
							<image :src="jieguojilu == '' ? '/static/img/no-pic.png' : jieguojilu"
								style="width: 100px;height: 100px;" @tap="showImage(jieguojilu)"></image>
						</view>
						<text class="btna" @tap="resultTable(addInspectData.companyInfo.SUP_PROCESS)">生成结果记录表</text>
					</view>
					<!-- <view class="box-item" @tap="pointCheck" style="text-align: center;display: flex;align-items: center;justify-content: center;margin-top: 20px;">
						<text v-if="checkDistance <= distance" class="location-status"  >您在检查区域内</text>
						<text v-if="checkDistance > distance" class="location-active"   >您不在检查区域内</text>
					</view> -->
				</view>
				<view class="button">
					<button class="determine" @click="finalConfirm()">确认</button>
					<button class="cancellation" @click="closeResultLog()">取消</button>
				</view>
			</view>
		</uni-popup>
		<!-- 显示告知单预览 -->
		<uni-popup ref="popupNotificationTwo" type="bottom">
			<view ref="popupNotificationContent" class="popupContent"
				style="padding: 14px;padding-bottom: 50px;overflow-y: auto;">
				<view id="scrrent-page">
					<view style="text-align: center;font-size: 23px;font-weight: 700;">食品经营销售日常监督检查</view>
					<view style="text-align: center;font-size: 18px;font-weight: 700;">告知页</view>
					<view style="border: 1px solid #dadada;padding: 10px;margin-top: 20px;">
						<view class="item-text">被检查单位：{{ addInspectData.companyInfo.COMPANY_NAME }}</view>
						<view class="item-text">地址：{{ addInspectData.companyInfo.ADDRESS }}</view>
						<view class="item-text">检查人员1：{{
							addInspectData.superviseInfo.checkPerson1Id | userNameFilter(this)
						}}
						</view>
						<view class="item-text">
							检查人员2：{{ addInspectData.superviseInfo.checkPerson2Id | userNameFilter(this) }}
						</view>
						<view class="item-text">检查时间：{{
							addInspectData.superviseInfo.CHECK_TIME == undefined ? inspectTime :
								addInspectData.superviseInfo.CHECK_TIME
						}}
						</view>
						<view class="item-text">告知事项：{{ notificationText | notificationFilter(this) }}</view>
						<view class="item-text"> 问：你（单位）是否申请回避？</view>
						<view class="item-text"> {{ applyForAvoidanceList[applyForAvoidanceValue.value] }}</view>
						<view class="item-text">
							检查单位签字:
							<image class="sig-image" :src="sigOnePic"></image>
						</view>
						<view class="item-text">
							检查人员1签字:
							<image class="sig-image" :src="sigTwoPic"></image>
						</view>
						<view class="item-text">
							检查人员2签字:
							<image class="sig-image" :src="sigThreePic"></image>
						</view>
					</view>
				</view>
				<view class="button">
					<button class="determine" @tap="printNotification" :disabled="!checkId">确认</button>
					<button class="cancellation" @click="closeNotification">关闭</button>
				</view>
			</view>
		</uni-popup>

		<screenshot ref="screenshot" :screenId="'scrrent-page'" @renderFinish="getScreenImg"></screenshot>
	</view>
</template>

<script>
import longscreen from '@/components/screenShot.vue'
import commonNavBar from '@/components/CommonNavBar.vue';

export default {
	components: {
		commonNavBar,
		'screenshot': longscreen
	},
	data() {
		return {
			baseUrl: uni.$baseUrl,
			selectedContent: null, //被选中的检查内容
			// checkResultStatus: '2',//检查结果可选
			checkResultStatus: '', //检查结果可选
			checkDistance: 0, //监察人与企业的距离
			distance: 0, //规定检查人与企业多少范围内可提交数据
			supProcess: '', //规定检查人与企业多少范围内可提交数据
			yaodianbiao: '',
			jieguojilu: '',
			checkId: '', //检查id，在临时保存之后会获取到
			sigOnePic: '',
			sigTwoPic: '',
			sigThreePic: '',
			checkBasis: '’', //检查指南中的检查依据
			checkGuide: '', //检查指南中的检查方式
			checkMethod: '', //检查指南中的检查指南
			checkProblem: '', //检查指南中的常见问题
			errNum: 0, //选择否的
			emphasisNum: 0, //重点项问题数
			generalNum: 0, //一般项问题数
			totalEmphasisNum: 0, //一般项问题数选择异常的时候拉满
			totalGeneralNum: 0, //一般项问题数选择异常的时候拉满
			companyId: null, //企业id
			checkNum: 0, //检查次数
			checkContentRiskList: [], //检查内容对应的检查风险
			distanceName: "",
			userList: [],
			stepList: [{
				step: '基础信息',
				active: true
			}, {
				step: '检查内容',
				active: false
			}, {
				step: '风险提示',
				active: false
			}],
			addInspectData: {
				companyInfo: {
					COMANY_PIC: '',

				},
				superviseInfo: {
					deptName: ''
				}
			},
			inspectTime: '',
			businessStatusList: [{
				id: '0',
				option: '正常',
				isChecked: true
			},
			{
				id: '1',
				option: '异常',
				isChecked: false
			}
			],
			abnormalCauseList: [{
				value: "不在注册地经营",
				text: "不在注册地经营"
			}],
			applyForAvoidanceValue: 0,
			applyForAvoidanceList: [{
				value: 0,
				text: "否"
			},
			{
				value: 1,
				text: "是"
			},
			],
			rectificationSituationDataList: [],
			activeIndex: [],
			activeOption: [],
			// problemDescriptionList: [{
			// 		value: '未按要求标注相关信息',
			// 		text: "未按要求标注相关信息"
			// 	},
			// 	{
			// 		value: '标注内容不合法',
			// 		text: "标注内容不合法"
			// 	},
			// 	{
			// 		value: '自定义备注',
			// 		text: "自定义备注"
			// 	},
			// ],
			inspectionInstructionsList: [{
				value: "仅销售预包装食品，无需取得食品经营许可",
				text: "仅销售预包装食品，无需取得食品经营许可"
			},
			{
				value: "自定义备注",
				text: "自定义备注"
			},
			],
			riskWarningData: {},
			addInspectriskLookData: [],
			taskAssociationList: [],
			notificationText: uni.$notificationText,
			taskAssociationChangeList: [],
			checkStatus: null,
			hasContentSelect2Or3: false,
			hasContentSelectIs: '',
			// 2023-12-5 新增
			socialResponsibilityData: {},
			socialResponsibilitySelectedContent: null,
			determineTwoDisabled: false
		}
	},
	onLoad(options) {
		const that = this;
		this.checkId = options.checkId == 'undefined' ? null : options.checkId
		this.companyId = options.companyId == 'undefined' ? null : options.companyId
		this.checkNum = options.checkNum == 'undefined' ? null : options.checkNum
		this.supProcess = options.supProcess == 'undefined' ? null : options.supProcess
		this.checkStatus = options.checkStatus == 'undefinde' ? null : options.checkStatus
	},
	async onReady() {
		// 初始日期
		const currentDate = new Date();
		const year = currentDate.getFullYear();
		const month = String(currentDate.getMonth() + 1).padStart(2, '0');
		const day = String(currentDate.getDate()).padStart(2, '0');
		const formattedDate = `${year}-${month}-${day}`;
		this.inspectTime = formattedDate

		// 基础信息数据
		this.basicInformationData();

		// 风险提示数据
		this.riskWarning()
		// 任务关联
		if (this.supProcess == 'spxs' || this.supProcess == 'cyfw') {
			this.taskAssociationOpen()
		}
	},
	filters: {
		notificationFilter(value, that) {
			return value.replace(/\${([^}]+)}/g, that.addInspectData.companyInfo.DEPT_NAME);
		},
		userNameFilter(value, that) {
			for (var i = 0; i < that.userList.length; i++) {
				if (that.userList[i].id == value) {
					return that.userList[i].text;
				}
			}
			return '';
		},
		filePathFilter(value) {
			if (value.indexOf("base64") <= 0) {
				return uni.$baseUrl + value;
			} else {
				return value;
			}
		}
	},
	methods: {
		// 获取基础信息数据
		async basicInformationData() {
			uni.showLoading({
				title: '获取检查内容',
				mask: true
			})
			this.loadUserList();
			const that = this;
			//可能是空，如果是空则是为检查过，后台会自动生成一个空的单子)
			let data = {}
			if (that.checkId != undefined && that.checkId != 'undefined' && that.checkId != '') {
				data.checkId = that.checkId
			}
			if (that.companyId != undefined && that.companyId != 'undefined' && that.companyId != '') {
				data.companyId = that.companyId
			}
			if (that.checkNum != undefined && that.checkNum != 'undefined' && that.checkNum != '') {
				data.checkNum = that.checkNum
			}
			const res = await uni.$api.getInspectionBaseInfo(data);
			if (res.data.code != '0') {
				uni.showModal({
					title: '警告',
					content: res.data.message,
					showCancel: false,
				})
				return;
			}
			if (!res.data.data || !res.data.data.superviseInfo || !res.data.data.superviseInfo.checkId) {
				uni.showToast({
					title: '未获取到检查单ID，请重试',
					icon: 'none'
				});
				return;
			}
			that.addInspectData = res.data.data
			that.checkId = res.data.data.superviseInfo.checkId;
			that.distance = res.data.data.DISTANCE;
			// 检查内容可选数据
			this.rectificationSituationData();
			// 企业未标注不校验距离/
			let lngLat = that.addInspectData.companyInfo.LNG_LAT + '';
			if (lngLat != 'undefined' && lngLat != undefined) {
				that.checkDistance = await uni.$mapUtil.getPointDistance(lngLat.split(',')[1], lngLat.split(',')[
					0]);
			}

			if (res.data.data.superviseInfo.resultRecordUrl != undefined) {
				that.jieguojilu = that.baseUrl + res.data.data.superviseInfo.resultRecordUrl;
			}
			if (res.data.data.superviseInfo.checkItemTableUrl != undefined) {
				that.yaodianbiao = that.baseUrl + res.data.data.superviseInfo.checkItemTableUrl;
			}

			// 异常核查记录
			this.abnormalCauseList = res.data.data.abnormalReasonType;
		},
		async loadUserList() {
			//获取监管人员信息
			const useRes = await uni.$api.getSupervisePersonList();
			this.userList = useRes.data.data;
		},
		// 基础信息经营状态是否正常
		businessStatusRadioChange(option) {
			this.businessStatusList.forEach(item => {
				item.isChecked = item.option === option;
			});
			this.$set(this.addInspectData.companyInfo, "MANAGE_STATUS", option.detail.value)

			// 2025-2-24增加
			if (option.detail.value == '1') {
				this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '不符合');
				this.$set(this.addInspectData.companyInfo, "RESULT_ACTION", '责令整改');
				this.$set(this.addInspectData.companyInfo, "PROCESS_RESULTS", "2");
				this.checkResultStatus = '1'
				this.hasContentSelect2Or3 = true;
			} else {
				this.$set(this.addInspectData.companyInfo, 'CHECK_RESULTS', '符合');
				this.$set(this.addInspectData.companyInfo, "RESULT_ACTION", '通过检查');
				this.$set(this.addInspectData.companyInfo, "PROCESS_RESULTS", "1");
				this.checkResultStatus = ''
				this.hasContentSelect2Or3 = false;
			}
			// if(option.detail.value == '1'){
			// 	this.checkResultStatus = ''
			// }
		},
		// 基础信息异常原因选项
		abnormalCauseChange(e) {
			this.$set(this.addInspectData.companyInfo, 'AUDIT_TRAILS', e);
		},
		// 基础信息整改时间选择日期
		rectificationTimeClick(e) {
			this.$set(this.addInspectData.companyInfo, 'RECTIFY_TIME', e.target.value);
		},
		showNoticeControl(filePath) {
			const that = this;
			if (filePath == undefined || filePath == 'undefined') {
				that.noticeFormOpen();
				return;
			}
			uni.showActionSheet({
				itemList: ['查看文件', '重新生成'],
				title: '选择操作',
				success: function (res) {
					if (res.tapIndex == 0) {
						Vue.prototype.$previewImage(filePath);
					} else if (res.tapIndex == 1) {
						that.noticeFormOpen();
					}
				}
			})
		},
		// 基础信息告知页
		noticeFormOpen() {
			const that = this;
			uni.showActionSheet({
				itemList: ['生成告知单', '选择文件'],
				title: '选择操作',
				success: function (res) {
					if (res.tapIndex == 0) {
						that.$refs.noticeForm.open('bottom');
					} else if (res.tapIndex == 1) {
						uni.chooseImage({
							count: 1,
							// sourceType:['camera'],
							success: (e) => {
								plus.io.resolveLocalFileSystemURL(e.tempFilePaths[0], function (
									entry) {
									//参数path:图片相对路径
									entry.file(function (file) {
										var fileReader = new plus.io
											.FileReader()
										fileReader.readAsDataURL(file)
										fileReader.onloadend = function (evt) {
											// let base64 = evt.target.result.split(",")[1]
											// console.log('获取到base64',evt.target.result);
											that.saveNotice(evt.target
												.result);
										}
									})
								})
							},
							fail: () => {
								uni.showToast({
									icon: 'error',
									title: '图片选择错误'
								})
							}
						})
					}
				}
			})

		},
		facadePhotoControl(filePath) {
			const that = this;
			if (filePath == undefined || filePath == 'undefined') {
				that.facadePhotoOpen();
				return;
			}
			uni.showActionSheet({
				itemList: ['查看文件', '重新上传'],
				title: '选择操作',
				success: function (res) {
					if (res.tapIndex == 0) {
						Vue.prototype.$previewImage(filePath);
					} else if (res.tapIndex == 1) {
						that.facadePhotoOpen();
					}
				}
			})

		},
		//上传门脸照片
		facadePhotoOpen() {
			const that = this;
			uni.chooseImage({
				count: 1,
				success: (e) => {
					uni.uploadFile({
						url: '/dailyInspect/uploadCheckFile',
						filePath: e.tempFilePaths[0],
						header: {
							'content-Type': 'multipart/form-data',
						},
						name: 'file',
						formData: {
							checkId: that.checkId
						},
						success: (res) => {
							const result = JSON.parse(res.data);
							if (result.code === 0) {
								uni.showToast({
									title: '上传成功',
									icon: 'error'
								})
								that.$set(that.addInspectData.companyInfo, "COMANY_PIC", result
									.data.comanyPic);
							} else {
								uni.showToast({
									title: '上传失败',
									icon: 'error'
								})
							}
						},
						fail: () => {
							uni.showToast({
								title: '上传失败',
								icon: 'error'
							})
						}
					})
				},
				fail: () => {
					uni.showToast({
						icon: 'error',
						title: '图片选择错误'
					})
				}
			})
		},
		// 基础信息告知页保存
		noticeFormDetermine() {

			if (this.sigOnePic == '' || this.sigOnePic == undefined) {
				uni.showToast({
					title: '请完成签名',
					icon: 'none'
				})
				return;
			}

			if (this.sigTwoPic == '' || this.sigTwoPic == undefined) {
				uni.showToast({
					title: '请完成签名',
					icon: 'none'
				})
				return;
			}

			if (this.sigThreePic == '' || this.sigThreePic == undefined) {
				uni.showToast({
					title: '请完成签名',
					icon: 'none'
				})
				return;
			}

			this.$refs.popupNotificationTwo.open();
		},
		// 基础信息告知页预览打印
		noticeFormCancellation() {
			if (this.sigOnePic == '' || this.sigOnePic == undefined) {
				uni.showToast({
					title: '请完成签名',
					icon: 'none'
				})
				return;
			}

			if (this.sigTwoPic == '' || this.sigTwoPic == undefined) {
				uni.showToast({
					title: '请完成签名',
					icon: 'none'
				})
				return;
			}

			if (this.sigThreePic == '' || this.sigThreePic == undefined) {
				uni.showToast({
					title: '请完成签名',
					icon: 'none'
				})
				return;
			}
			this.$refs.popupNotificationTwo.open();
		},
		printNotification() {
			const that = this;
			uni.showLoading({
				title: '正在生成',
				mask: true
			})

			//将告知单存储页面生成图片保存到相册并上传到服务器
			this.$refs.screenshot.startScreen();
		},
		async saveNotice(noticePic) {
			const that = this;
			// 检查 checkId 是否有效
			if (!that.checkId || that.checkId === 'undefined') {
				uni.showToast({
					title: '请等待数据加载完成',
					icon: 'none'
				});
				return;
			}
			if (this.addInspectData.superviseInfo.checkPerson1Id == undefined) {
				uni.showToast({
					title: '请先选择执法人'
				})
				return;
			}
			if (this.addInspectData.superviseInfo.checkPerson2Id == undefined) {
				uni.showToast({
					title: '请先选择执法人'
				})
				return;
			}
			const res = await uni.$api.saveCheckInform({
				"checkId": that.checkId,
				"checkPerson1Id": this.addInspectData.superviseInfo.checkPerson1Id,
				"checkPerson2Id": this.addInspectData.superviseInfo.checkPerson2Id,
				"isAvoid": this.applyForAvoidanceValue,
				"notifyMatters": this.notificationText,
				"companySignFile": this.sigOnePic,
				"checkPerson1SignFile": this.sigTwoPic,
				"checkPerson2SignFile": this.sigThreePic,
				"informFile": noticePic,
				"taskIds": this.taskAssociationChangeList.join(",")
			});

			uni.hideLoading();
			if (res.data.code == '0') {
				that.$set(that.addInspectData.superviseInfo, "informUrl", res.data.data);
				uni.showModal({
					content: '保存成功,告知单图片已自动存储到相册',
					title: '提示',
					showCancel: false,
					success: function () {
						that.$refs.popupNotificationTwo.close();
						that.$refs.noticeForm.close();
					}
				})
			} else {
				uni.showToast({
					icon: 'success',
					title: '告知单存储失败'
				})
			}
		},
		getScreenImg(res) {
			//生成告知单图片的
			const that = this;
			//根据传输过来的id 和选中的图片传到后台直接保存
			uni.saveImageToPhotosAlbum({
				filePath: res.posterPath,
				success: function () {
					uni.hideLoading();
					uni.showLoading({
						title: '正在保存告知单信息',
						mask: true
					})
					plus.io.resolveLocalFileSystemURL(res.posterPath, function (entry) {
						//参数path:图片相对路径
						entry.file(function (file) {
							var fileReader = new plus.io.FileReader()
							fileReader.readAsDataURL(file)
							fileReader.onloadend = function (evt) {
								// let base64 = evt.target.result.split(",")[1]
								// console.log('获取到base64',evt.target.result);
								that.saveNotice(evt.target.result);
							}
						})
					})
				},
				fail: () => {
					uni.hideLoading();
					uni.showToast({
						icon: 'error',
						title: '请给与相册权限，否则告知单将无法存贮在手机中'
					})
				}
			})

		},

		// 关闭告知页预览打印
		closeNotification() {
			this.$refs.popupNotificationTwo.close()
		},
		// 检查内容检查结果
		accordRadioChange(option) {
			this.$set(this.addInspectData.companyInfo, 'CHECK_RESULTS', option.target.value);
		},
		// 检查内容处理结果
		handleRadioChange(option) {
			this.$set(this.addInspectData.companyInfo, 'PROCESS_RESULTS', option.target.value);
		},
		// 检查内容可选数据
		async rectificationSituationData() {
			const that = this;
			let data = {
				checkId: that.checkId,
				companyId: that.companyId
			}
			const res = await uni.$api.checkItemList(data);

			var dataList = res.data.data;
			// 2024-12-5 新增
			this.socialResponsibility()
			for (var i = 0; i < dataList.itemList.length; i++) {
				this.templateId = dataList.itemList[i].TEMPLATE_ID
				for (var y = 0; y < dataList.itemList[i].contentList.length; y++) {

					if (dataList.itemList[i].contentList[y] == undefined) {
						continue;
					}
					//记录选择否的数量
					if (dataList.itemList[i].contentList[y].IMPORTENT_ITEM === '2') {
						//计算问题项数量;
						if (dataList.itemList[i].contentList[y].SELECTION === '2') {
							this.emphasisNum = this.emphasisNum + 1;
							this.errNum = this.errNum + 1
						}
						//一般项问题数选择异常的时候拉满
						this.totalEmphasisNum = this.totalEmphasisNum + 1;
					} else {
						//计算问题项数量;
						if (dataList.itemList[i].contentList[y].SELECTION === '2') {
							this.generalNum = this.generalNum + 1;
							this.errNum = this.errNum + 1
						}
						//一般项问题数选择异常的时候拉
						this.totalGeneralNum = this.totalGeneralNum + 1;
					}
				}
			}
			if (this.errNum > 0) {
				this.checkResultStatus = '1'
				// this.$set(this.addInspectData.companyInfo,"PROCESS_RESULTS" ,"");
			} else {
				this.checkResultStatus = '2'
				// this.$set(this.addInspectData.companyInfo,"PROCESS_RESULTS" ,"1");
			}
			//如果之前选择的是异常 则选择结果可自己选择
			// if(this.addInspectData.companyInfo.MANAGE_STATUS == 1){
			// 	this.checkResultStatus = ''
			// }
			that.rectificationSituationDataList = dataList;
			uni.hideLoading()
		},
		inspectionContentActive(index, value) {
			var d = this.rectificationSituationDataList.itemList[index];
			this.$set(d, "rightButtonActive", value)
			var contentList = d.contentList;
			for (var i = 0; i < contentList.length; i++) {
				if (value === 3) {
					if (d.contentList[i].MISSING_ITEM === '1' || this.addInspectData.companyInfo.SUP_PROCESS ==
						'spsc' || this.addInspectData.companyInfo.SUP_PROCESS == 'tssc') {
						//存在3的按钮
						this.$set(d.contentList[i], "SELECTION", value);
					}
					if (this.rectificationSituationDataList.itemList[index].contentList[i].checkMissingList.length ===
						1) {
						this.$set(d.contentList[i], "MISSING_ITEM_CONTENT", this.rectificationSituationDataList
							.itemList[index].contentList[i].checkMissingList[0].value);
					}
				} else {
					this.$set(d.contentList[i], "SELECTION", value);
					this.$set(d.contentList[i], "MISSING_ITEM_CONTENT", '');
				}
			}
			this.loadErrorNum();
			this.loadResultBtn();
		},
		// 检查内容记录表选项选中状态
		async inspectionContentToggleActive(index, dataIndex, option, templateId, standardId, contentId, result) {
			var d = this.rectificationSituationDataList.itemList[index].contentList[dataIndex];
			this.$set(d, "SELECTION", result);
			// this.$set(d,"MISSING_ITEM_CONTENT",this.inspectionInstructionsList[0].value);
			this.loadErrorNum();
			if (result === 3) {
				if (this.rectificationSituationDataList.itemList[index].contentList[dataIndex].checkMissingList
					.length === 1) {
					this.$set(d, "MISSING_ITEM_CONTENT", this.rectificationSituationDataList.itemList[index]
						.contentList[dataIndex].checkMissingList[0].value);
				}
			} else {
				this.$set(d, "MISSING_ITEM_CONTENT", '');
			}
			this.loadResultBtn();
			// let allYes = true;
			// let hasNoOrReasonable = false;
			// let hasBasicCompliance = false;
			// let falseList = [];

			// for (var i = 0; i < this.rectificationSituationDataList.itemList.length; i++) {
			//     for (var y = 0; y < this.rectificationSituationDataList.itemList[i].contentList.length; y++) {
			//         let content = this.rectificationSituationDataList.itemList[i].contentList[y];
			//         let contentSelect = this.rectificationSituationDataList.itemList[i].contentList[y].SELECTION;

			// 		if (contentSelect !== undefined && typeof contentSelect === 'string') {
			// 			contentSelect = Number(contentSelect);
			// 		}

			//         if (contentSelect !== 1 && contentSelect !== undefined) {
			//             allYes = false;
			//             falseList.push(this.rectificationSituationDataList.itemList[i].contentList[y]);

			//             if (content.IMPORTENT_ITEM === "2") {
			//                 hasNoOrReasonable = true;
			//                 break;
			//             } else if (content.IMPORTENT_ITEM === "1" && (contentSelect === 2 || contentSelect === 3)) {
			//                 hasBasicCompliance = true;
			//             }
			//         }
			//     }
			//     if (hasNoOrReasonable) break;
			// }

			// this.falseCount = falseList.length;
			// if (this.falseCount > 0) {
			//     if (hasNoOrReasonable) {
			//         this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '不符合');
			//     } else if (hasBasicCompliance) {
			//         this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '基本符合');
			//     }
			// 	this.hasContentSelect2Or3 = true;
			// } else {
			//     this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '符合');
			// 	this.hasContentSelect2Or3 = false;
			// }


			// let allYes = true;
			// let hasNoOrReasonable = false;
			// let hasBasicCompliance = false;
			// let falseList = [];

			// for (var i = 0; i < this.rectificationSituationDataList.itemList.length; i++) {
			//     for (var y = 0; y < this.rectificationSituationDataList.itemList[i].contentList.length; y++) {
			//         let content = this.rectificationSituationDataList.itemList[i].contentList[y];
			//         let contentSelect = this.rectificationSituationDataList.itemList[i].contentList[y].SELECTION;

			//         if (contentSelect !== undefined && typeof contentSelect === 'string') {
			//             contentSelect = Number(contentSelect);
			//         }

			//         if (contentSelect !== 1 && contentSelect !== 3 && contentSelect !== undefined) {
			//             allYes = false;
			//             falseList.push(this.rectificationSituationDataList.itemList[i].contentList[y]);

			//             if (content.IMPORTENT_ITEM === "2") {
			//                 hasNoOrReasonable = true;
			//                 break;
			//             } else if (content.IMPORTENT_ITEM === "1" && (contentSelect === 2)) {
			//                 hasBasicCompliance = true;
			//             }
			//         }
			//     }
			//     if (hasNoOrReasonable) break;
			// }

			// this.falseCount = falseList.length;
			// if (this.falseCount > 0) {
			//     if (hasNoOrReasonable) {
			//         this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '不符合');
			//     } else if (hasBasicCompliance) {
			//         this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '基本符合');
			//     } else {
			//         // 如果没有不符合或基本符合的情况，并且存在contentSelect为3，则视为符合
			//         this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '符合');
			//     }
			//     this.hasContentSelect2Or3 = true;
			// } else {
			//     this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '符合');
			//     this.hasContentSelect2Or3 = false;
			// }


		},
		loadResultBtn() {

			let allYes = true;
			let hasNoOrReasonable = false;
			let hasBasicCompliance = false;
			let falseList = [];

			for (var i = 0; i < this.rectificationSituationDataList.itemList.length; i++) {
				for (var y = 0; y < this.rectificationSituationDataList.itemList[i].contentList.length; y++) {
					let content = this.rectificationSituationDataList.itemList[i].contentList[y];
					let contentSelect = this.rectificationSituationDataList.itemList[i].contentList[y].SELECTION;

					if (contentSelect !== undefined && typeof contentSelect === 'string') {
						contentSelect = Number(contentSelect);
					}

					if (contentSelect !== 1 && contentSelect !== 3 && contentSelect !== undefined) {
						allYes = false;
						falseList.push(this.rectificationSituationDataList.itemList[i].contentList[y]);

						if (content.IMPORTENT_ITEM === "2") {
							this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '不符合');
							this.$set(this.addInspectData.companyInfo, "RESULT_ACTION", '调查处理');
							this.$set(this.addInspectData.companyInfo, "PROCESS_RESULTS", "3");
							hasNoOrReasonable = true;
							break;
						} else if (content.IMPORTENT_ITEM === "1" && (contentSelect === 2)) {
							hasBasicCompliance = true;
						}
					}
				}
				if (hasNoOrReasonable) break;
			}

			this.falseCount = falseList.length;
			if (this.falseCount > 0) {
				if (hasNoOrReasonable) {
					// 重点项选"否"，结果已经是"不符合"，并且设置为"调查处理"
					this.checkResultStatus = '1'
					this.hasContentSelect2Or3 = true;
				} else if (hasBasicCompliance) {
					this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '基本符合');
					this.hasContentSelect2Or3 = false;
					this.$set(this.addInspectData.companyInfo, "PROCESS_RESULTS", '2');
					// this.$set(this.addInspectData.companyInfo, "RESULT_ACTION", '责令整改');
					// 非重点项选"否"，监管人员可以选择"基本符合"
					this.checkResultStatus = '1'
					this.hasContentSelectIs = '1'
				} else {
					//         this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '不符合');
					//         // 其他项选"否"，结果设置为"不符合"
					// this.hasContentSelect2Or3 = false;
					// this.hasContentSelectIs = ''
					// this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '符合');
				}
			} else {
				this.$set(this.addInspectData.companyInfo, "CHECK_RESULTS", '符合');
				this.checkResultStatus = ''
				this.hasContentSelectIs = ''
				this.$set(this.addInspectData.companyInfo, "PROCESS_RESULTS", '1');
				this.hasContentSelect2Or3 = false;
			}
		},
		contentSelectedStatus(index, dataIndex) {
			//实现选中样式
			this.selectedContent = 'content' + index + ':' + dataIndex;
		},
		// 检查内容记录表选项
		inspectionContentIsActive(index, dataIndex, option) {
			return this.activeIndex.some(item => item.index === index && item.dataIndex === dataIndex && item
				.option === option);
		},
		inspectionContentIsActiveOption(index, dataIndex, option) {
			return this.inspectionContentIsActive(index, dataIndex, option) && this.activeOption.some(item => item
				.index === index && item
					.dataIndex === dataIndex && item.option === option);
		},
		// 检查内容记录表选项-否-问题描述
		async problemDescriptionChange(e, index, dataIndex, templateId, standardId, contentId, result,
			problemPreType) {
			if (problemPreType == '1') {
				//多选
				var d = this.rectificationSituationDataList.itemList[index].contentList[dataIndex];
				const selectedOptions = this.rectificationSituationDataList.itemList[index].contentList[dataIndex]
					.checkProblemList.filter(option => option.is_selected);
				const selectedTexts = selectedOptions.map(option => option.text).join("##");
				this.$set(d, "PROBLEM_CONTENT", selectedTexts);
			} else {

				//单选
				var d = this.rectificationSituationDataList.itemList[index].contentList[dataIndex];
				this.$set(d, "PROBLEM_CONTENT", e);
			}

		},
		// 选择自定义备注之后手动输入
		async saveInspectionProblemContent(e, index, dataIndex, templateId, standardId, contentId, result) {
			const that = this;
			var d = this.rectificationSituationDataList.itemList[index].contentList[dataIndex];
		},
		// 选择否-自定义的时候上传文件信息
		async uploadContentFile(index, dataIndex, standardId, contentId) {
			const that = this;
			uni.chooseImage({
				count: 1,
				success: (e) => {
					plus.io.resolveLocalFileSystemURL(e.tempFilePaths[0], function (entry) {
						entry.file(function (file) {
							var fileReader = new plus.io.FileReader()
							fileReader.onload = function (evt) {
								that.$set(that.rectificationSituationDataList
									.itemList[index].contentList[dataIndex],
									"PROBLEM_FILE", evt.target.result);
							}
							fileReader.readAsDataURL(file)
						}, function (error) {
							uni.showToast({
								title: '图片生成失败',
								icon: 'error'
							})
						})
					}, function (error) {
						uni.showToast({
							title: '获取文件失败',
							icon: 'error'
						})
					})
				},
				fail: () => {
					uni.showToast({
						icon: 'error',
						title: '图片选择错误'
					})
				}
			})
		},
		showContentFileControls(index, dataIndex, standardId, contentId, filePath) {
			//检查内容选否之后上传文件后点击弹出选择查看文件还是上传文件
			const that = this;
			uni.showActionSheet({
				itemList: ['查看文件', '重新上传'],
				title: '选择操作',
				success: function (res) {
					if (res.tapIndex == 0) {
						Vue.prototype.$previewImage(filePath);
					} else if (res.tapIndex == 1) {
						that.uploadContentFile(index, dataIndex, standardId, contentId);
					}
				}
			})


		},
		// 检查内容记录表选项-合理缺项-问题描述
		async inspectionInstructionsChange(e, index, dataIndex, templateId, standardId, contentId, result) {
			var d = this.rectificationSituationDataList.itemList[index].contentList[dataIndex];
			this.$set(d, "MISSING_ITEM_CONTENT", e);
		},
		// 选择合理缺项-问题描述自定义之后手动输入
		async saveMissingItemContent(e, index, dataIndex, templateId, standardId, contentId, result) {
			const that = this;
			var d = this.rectificationSituationDataList.itemList[index].contentList[dataIndex];
		},
		// 风险提示数据
		async riskWarning() {
			let data = {
				companyId: this.companyId,
			}

			try {
				const res = await uni.$api.getCompanyRiskInfo(data);
				this.riskWarningData = res.data.data
				// 风险提示-弹窗
				if (Object.keys(this.riskWarningData).length !== 0) {
					this.riskWarningPopup()
				}
			} catch (error) {
				console.error(error)
			}
		},
		// 风险提示-查看详情
		async addInspectriskLook(number) {
			let data = {
				companyId: this.companyId,
				riskType: number
			}

			try {
				const res = await uni.$api.getRiskInfo(data);
				this.addInspectriskLookData = res.data.data
				if (this.$refs.riskReminderDetails) {
					this.$refs.riskReminderDetails.open('bottom')
				}
			} catch (error) {
				console.error(error)
			}
		},
		// 风险提示-查看详情-返回
		riskReminderDetailsClose() {
			this.$refs.riskReminderDetails.close();
		},
		// 任务关联
		async taskAssociationOpen() {
			//获取是否有其他待完成的日常和专项检查可进行合并
			const res = await uni.$api.getSpecialInspectList({
				companyId: this.companyId
			});
			if (res.data.code == '0') {
				if (this.$refs.taskAssociation && res.data.data.length > 0) {
					for (var i = 0; i < res.data.data.length; i++) {
						this.taskAssociationList.push({
							id: res.data.data[i].ID,
							title: res.data.data[i].TASK_NAME
						});
					}
					this.$refs.taskAssociation.open('bottom')
				}
			}

		},
		// 任务关联-选中
		taskAssociationChange(item) {
			const index = this.taskAssociationChangeList.findIndex((selectedItem) => selectedItem === item.id);
			if (index >= 0) {
				this.taskAssociationChangeList.splice(index, 1);
			} else {
				this.taskAssociationChangeList.push(item.id);
			}
		},
		// 任务关联-确认按钮
		taskAssociationDetermine() {
			this.$refs.taskAssociation.close('bottom')
		},
		// 任务关联-取消按钮
		taskAssociationCancellation() {
			this.$refs.taskAssociation.close('bottom')
		},
		// 基础信息-风险提示弹窗
		riskWarningPopup() {
			if (this.$refs.riskWarningPopup) {
				this.$refs.riskWarningPopup.open('bottom')
			}
		},
		// 基础信息-风险提示弹窗-我已知晓
		IAlreadyKnow() {
			this.$refs.riskWarningPopup.close('bottom')
		},
		// 检查内容-操作指南
		inspectionGuidelines(checkBasis, //检查指南中的检查依据
			checkGuide, //检查指南中的检查方式
			checkMethod, //检查指南中的检查指南
			checkProblem) {
			this.checkBasis = checkBasis
			this.checkGuide = checkGuide
			this.checkMethod = checkMethod
			this.checkProblem = checkProblem
			if (this.$refs.inspectionGuidelines) {
				this.$refs.inspectionGuidelines.open('bottom')
			}
		},
		// 检查内容-操作指南-关闭
		inspectionGuidelinesClose() {
			this.$refs.inspectionGuidelines.close('bottom')
		},
		loadErrorNum() {
			//计算选择的重点项发现问题数，一般项发现问题数量
			this.emphasisNum = 0; //重点项问题数
			this.generalNum = 0; //一般项问题数
			this.errNum = 0; //选择否的数量
			var itemList = this.rectificationSituationDataList.itemList;
			for (var i = 0; i < itemList.length; i++) {
				for (var y = 0; y < itemList[i].contentList.length; y++) {
					if (itemList[i].contentList[y].SELECTION == '2') {
						this.errNum = this.errNum + 1;
						if (itemList[i].contentList[y].IMPORTENT_ITEM == '2') {
							this.emphasisNum = this.emphasisNum + 1;
						} else {
							this.generalNum = this.generalNum + 1;
						}
					}
				}
			}
			// if(this.errNum > 0){
			// 	this.checkResultStatus = '1'
			// 	this.$set(this.addInspectData.companyInfo,"PROCESS_RESULTS" ,"");
			// } else {
			// 	this.checkResultStatus = '2'
			// this.$set(this.addInspectData.companyInfo,"PROCESS_RESULTS" ,"1");
			// }
		},
		//保存数据
		async savePopup(type) {
			// console.log('addInspectData.companyInfo.MANAGE_STATUS', this.addInspectData.companyInfo.MANAGE_STATUS)
			// console.log('addInspectData.companyInfo.MANAGE_STATUS', typeof this.addInspectData.companyInfo.MANAGE_STATUS)
			this.saveType = type
			if (type == '1') {
				//临时保存
				this.determineTwo();
				return;
			}
			uni.showLoading({
				title: '校验位置',
				mask: true
			})
			let lngLat = this.addInspectData.companyInfo.LNG_LAT + '';
			if (lngLat == undefined || lngLat == 'undefined') {
				uni.showToast({
					title: '企业位置未标注',
					icon: 'error',
					duration: 5000
				})
				return
			}
			//当前企业与设备的距离
			this.checkDistance = await uni.$mapUtil.getPointDistance(lngLat.split(',')[1], lngLat.split(',')[0]);
			uni.hideLoading();
			if (this.checkDistance > this.addInspectData.DISTANCE) {
				//if(this.checkDistance > Number(uni.$distance)){
				uni.showToast({
					title: '不在检查范围',
					icon: 'error',
					duration: 5000
				})
				return;
			}
			if (type != '1') {
				//表单填写验证
				if (this.addInspectData.superviseInfo.checkPerson1Id == '' || this.addInspectData.superviseInfo
					.checkPerson1Id == undefined) {
					uni.showToast({
						title: '请选择执法人员',
						icon: 'none'
					})
					return;
				}
				if (this.addInspectData.superviseInfo.checkPerson2Id == '' || this.addInspectData.superviseInfo
					.checkPerson2Id == undefined) {
					uni.showToast({
						title: '请选择执法人员',
						icon: 'none'
					})
					return;
				}
				if (this.addInspectData.companyInfo.MANAGE_STATUS == '' || this.addInspectData.companyInfo
					.MANAGE_STATUS == undefined) {
					uni.showToast({
						title: '请选择经营状态',
						icon: 'none'
					})
					return;
				}
				if (this.addInspectData.companyInfo.MANAGE_STATUS == '0') {
					if (this.addInspectData.superviseInfo.informUrl == '' || this.addInspectData.superviseInfo
						.informUrl == undefined) {
						uni.showToast({
							title: '请上传告知页内容',
							icon: 'none'
						})
						return;
					}
					//检查内容是否全部选择
					const itemList = this.rectificationSituationDataList.itemList;
					for (var y = 0; y < itemList.length; y++) {
						const contentList = itemList[y].contentList;
						for (var i = 0; i < contentList.length; i++) {
							if (contentList[i].SELECTION == '' || contentList[i].SELECTION == undefined) {
								uni.showToast({
									// ${itemList[y].STANDARD_NAME}
									title: `${itemList[y].SERIAL_NUM}.${contentList[i].SERIAL_NUM}存在检查内容还未处理`,
									icon: 'none'
								})
								return;
							} else {
								//如果已经选择否了
								if (contentList[i].SELECTION == '2' && contentList[i].PROBLEM_FILE == undefined) {
									uni.showToast({
										title: `${itemList[y].SERIAL_NUM}.${contentList[i].SERIAL_NUM}选择否的检查内容需要上传文件信息`,
										icon: 'none'
									})
									return;
								} else if (contentList[i].SELECTION == '2' && contentList[i].checkProblemList
									.length != 0 && contentList[i].PROBLEM_CONTENT == undefined) {
									uni.showToast({
										title: `${itemList[y].SERIAL_NUM}.${contentList[i].SERIAL_NUM}有检查内容的问题描述信息未选择原因`,
										icon: 'none'
									})
									return;
								} else if (contentList[i].SELECTION == '2' && contentList[i].checkProblemList
									.length == 0 && contentList[i].PROBLEM_CONTENT_INPUT == undefined) {
									uni.showToast({
										title: `${itemList[y].SERIAL_NUM}.${contentList[i].SERIAL_NUM}有检查内容的问题描述中自定义备注信息未填写`,
										icon: 'none'
									})
									return;
								} else if (contentList[i].SELECTION == '3' && contentList[i]
									.MISSING_ITEM_CONTENT == '自定义备注' && contentList[i]
										.MISSING_ITEM_CONTENT_INPUT == undefined) {
									uni.showToast({
										title: `${itemList[y].SERIAL_NUM}.${contentList[i].SERIAL_NUM}有检查内容的合理缺项中自定义备注信息未填写`,
										icon: 'none'
									})
									return;
								} else if (contentList[i].SELECTION == '3' &&
									(contentList[i].MISSING_ITEM_CONTENT === undefined || contentList[i]
										.MISSING_ITEM_CONTENT === '') &&
									(contentList[i].MISSING_ITEM_CONTENT_INPUT === undefined || contentList[i]
										.MISSING_ITEM_CONTENT_INPUT.trim() === '')) {
									uni.showToast({
										title: `${itemList[y].SERIAL_NUM}.${contentList[i].SERIAL_NUM}有检查内容中的合理缺项未填写原因`,
										icon: 'none'
									});
									return;
								}

								// else if(contentList[i].SELECTION == '3' && contentList[i].MISSING_ITEM_CONTENT == undefined){
								// 	uni.showToast({
								// 		title:`${itemList[y].SERIAL_NUM}.${contentList[i].SERIAL_NUM}有检查内容中的合理缺项未选择原因`,
								// 		icon : 'none'
								// 	})
								// 	return;
								// }


							}
						}
					}
					//非异常情况
					if (this.addInspectData.companyInfo.PROCESS_RESULTS == '' || this.addInspectData.companyInfo
						.PROCESS_RESULTS == undefined) {
						uni.showToast({
							title: '请选择检查内容中的处理结果',
							icon: 'none'
						})
						return;
					}

					//选择责令整改或者调查处理的时候验证整改时间是否选择
					// if(this.addInspectData.companyInfo.PROCESS_RESULTS != '1' &&  this.addInspectData.companyInfo.RECTIFY_TIME == undefined){
					if (this.addInspectData.companyInfo.PROCESS_RESULTS != '1' && (this.addInspectData.companyInfo
						.RECTIFY_TIME == undefined || this.addInspectData.companyInfo.RECTIFY_TIME == '')) {
						uni.showToast({
							title: '请选择整改时间',
							icon: 'none'
						})
						return;
					}

				}
				if (this.addInspectData.companyInfo.MANAGE_STATUS == '1') {
					//异常情况
					/* 	if(this.addInspectData.companyInfo.ABNORMAL_CAUSE == ''  || this.addInspectData.companyInfo.ABNORMAL_CAUSE  == undefined ){
					uni.showToast({
						title:'请选择异常原因',
						icon : 'none'
					})
					return;
				 }*/
					// if(this.addInspectData.companyInfo.AUDIT_TRAILS == ''  || this.addInspectData.companyInfo.AUDIT_TRAILS  == undefined ){
					// 	uni.showToast({
					// 		title:'请选择异常核查记录',
					// 		icon : 'none'
					// 	})
					// 	return;
					// }
					// if(this.addInspectData.companyInfo.AUDIT_TRAILS == ''  || this.addInspectData.companyInfo.AUDIT_TRAILS  == undefined ){
					// 	uni.showToast({
					// 		title:'请选择异常核查记录',
					// 		icon : 'none'
					// 	})
					// 	return;
					// }
					if (this.addInspectData.companyInfo.RECTIFY_TIME == '' || this.addInspectData.companyInfo
						.RECTIFY_TIME == undefined) {
						uni.showToast({
							title: '请选择整改日期',
							icon: 'none'
						})
						return;
					}
				}
			}
			this.$refs.popupTwo.open('bottom')
		},
		//取消保存
		cancellationTwo() {
			this.$refs.popupTwo.close()
			this.determineTwoDisabled = false;
		},
		async determineTwo() {
			const that = this;
			try {
				uni.showLoading({
					title: '正在生成数据，请稍后',
					mask: true
				})
				that.determineTwoDisabled = true;
				const res = await uni.$api.saveCheckInfo({
					'checkId': this.checkId,
					'superviseOne': this.addInspectData.superviseInfo.checkPerson1Id,
					'superviseTwo': this.addInspectData.superviseInfo.checkPerson2Id,
					'manageStatus': this.addInspectData.companyInfo.MANAGE_STATUS,
					'doorHeadName': this.addInspectData.companyInfo.DOOR_HEAD_NAME,
					'signName': this.addInspectData.companyInfo.SIGN_NAME,
					//如果点击的提交不是临时保存，并且选择的是经营异常，则直接保存,否则会临时保存一下，等待填写完后面两个表之后正是保存
					'temporary': (this.saveType != '1' && this.addInspectData.companyInfo.MANAGE_STATUS ==
						'1') ? '2' : '1',
					'checkResults': this.addInspectData.companyInfo.CHECK_RESULTS,
					'processResults': this.addInspectData.companyInfo.PROCESS_RESULTS,
					'contactPhone': this.addInspectData.companyInfo.CONTACT_PHONE,
					'legalPerson': this.addInspectData.companyInfo.LEGAL_PERSON,
					'abnormalCause': this.addInspectData.companyInfo.ABNORMAL_CAUSE,
					'auditTrails': this.addInspectData.companyInfo.AUDIT_TRAILS,
					'exprocessResults': '责令整改',
					'rectificationTimeLimit': this.addInspectData.companyInfo.RECTIFY_TIME,
					'otherProblem': this.addInspectData.companyInfo.OTHER_PROBLEM,
					"rectificationSituationData": JSON.stringify(this.rectificationSituationDataList),
					'liabilitySituationData': JSON.stringify(this.socialResponsibilityData),
					"taskIds": this.taskAssociationChangeList.join(",")
				});
				uni.showToast({
					title: res.data.message,
					icon: 'success',
					image: '/static/img/success.png',
					duration: 2000,
				});
				this.$refs.popupTwo.close();
				if (res.data.code == '0') {
					that.checkId = res.data.data.id
					if (this.saveType != '1' && this.addInspectData.companyInfo.MANAGE_STATUS == '0') {

						uni.hideLoading();
						that.$refs.resultLog.open();
					} else {
						if (this.addInspectData.companyInfo.MANAGE_STATUS == '1') {
							//如果是经营异常 保存完成zhijie
							const eventChannel = that.getOpenerEventChannel();
							eventChannel.emit('reloadList');
							uni.navigateBack()
							// uni.redirectTo({
							// 	url: '/pages/inspect/inspect?index='+this.checkStatus
							// });
						}
					}
					that.determineTwoDisabled = false;
				} else {
					that.determineTwoDisabled = false;
				}
			} catch (error) {
				console.error(error)
			}
		},
		closeResultLog() {
			this.$refs.resultLog.close();
		},
		async finalConfirm() {
			const that = this;
			//经营异常的时候不用判断这两个表
			if ((this.jieguojilu == '' || this.jieguojilu == undefined) && this.addInspectData.companyInfo
				.MANAGE_STATUS == '0') {
				uni.showToast({
					title: '请先上传或生成结果要点表',
					icon: 'none'
				})
				return;
			}

			//修改检查单为检查完成
			uni.showLoading({
				title: '正在保存，请稍后',
				mask: true
			})
			/* 				var  checkResults = "";
		if(this.addInspectData.companyInfo.MANAGE_STATUS == '1'){
			checkResults = '重点项发现问题（'+ this.totalEmphasisNum +'）项,一般项发现问题（'+ this.totalGeneralNum +'）项';
		} else {
			checkResults = '重点发现问题（'+ this.emphasisNum +'）项,一般发现问题 （'+ this.generalNum +'）项';
		}   */
			let checkResults = "其他";
			if (this.addInspectData.companyInfo.SUP_PROCESS == 'cyfw' || this.addInspectData.companyInfo
				.SUP_PROCESS == 'spxs') {
				//由于特食的不要检查结果这项了 生产的用的不是这个页面，所以这里只在经营的进行存储
				checkResults = this.addInspectData.companyInfo.CHECK_RESULTS;
			}
			const res3 = await uni.$api.finaSaveInfo({
				'checkId': this.checkId,
				'checkResults': checkResults,
				'auditTrails': this.addInspectData.companyInfo.AUDIT_TRAILS,
				'abnormalCause': this.addInspectData.companyInfo.ABNORMAL_CAUSE,
				'processResults': this.addInspectData.companyInfo.PROCESS_RESULTS,
				'rectificationTimeLimit': this.addInspectData.companyInfo.RECTIFY_TIME,
				'contactPhone': this.addInspectData.companyInfo.CONTACT_PHONE,
				'legalPerson': this.addInspectData.companyInfo.LEGAL_PERSON,
				'doorHeadName': this.addInspectData.companyInfo.DOOR_HEAD_NAME,
				'signName': this.addInspectData.companyInfo.SIGN_NAME,
				'temporary': '2', //正式存储
				"taskIds": this.taskAssociationChangeList.join(",")
			});
			uni.showToast({
				title: res3.data.message,
				icon: 'success',
				image: '/static/img/success.png',
				duration: 2000,
			});
			uni.hideLoading();
			if (res3.data.code == '0') {
				const eventChannel = that.getOpenerEventChannel();
				eventChannel.emit('reloadList');
				uni.navigateBack()
				// uni.redirectTo({
				// 	url: '/pages/inspect/inspect?index='+this.checkStatus
				// });
			}
		},
		//认证主体是否已经标注
		isLocationPoint(lng_lat) {
			if (lng_lat != undefined && lng_lat != '' && lng_lat != 'undefined') {
				return true;
			} else {
				return false;
			}
		},
		//验证坐标距离
		async checkDistanceFun() {
			let lngLat = this.addInspectData.companyInfo.LNG_LAT + '';
			//当前企业与设备的距离
			this.checkDistance = await uni.$mapUtil.getPointDistance(lngLat.split(',')[1], lngLat.split(',')[0]);
			if (this.checkDistance > this.addInspectData.DISTANCE) {
				let num = this.checkDistance - this.addInspectData.DISTANCE;
				let fruitArray = lngLat.split(",");
				this.distanceName = "当前位置坐标:" + parseFloat(fruitArray[0].toString()).toFixed(6) + "," + parseFloat(
					fruitArray[1].toString()).toFixed(6) + "，距离主体" + num.toFixed(2) +
					"米(G)(超出范围)";
				return false;
			} else {
				this.distanceName = "当前已经在检查范围内";
				return true;
			}
		},
		companyDimension(lng_lat) {
			//进入到企业标注
			const that = this;
			//   if (lng_lat != undefined && lng_lat != '' && lng_lat != 'undefined') {
			//     //已经标注过了
			//     uni.navigateTo({
			//       url: '/pages/dimension/showPoint?companyId=' + this.companyId + '&lng_lat=' + lng_lat
			//     })
			//     return;
			//   }
			uni.navigateTo({
				url: '/pages/dimension/dimension?companyId=' + this.companyId + '&lng_lat=' + lng_lat,
				events: {
					// 为指定事件添加一个监听器，获取被打开页面传送到当前页面的数据
					updateLngLat: function (data) {
						that.$set(that.addInspectData.companyInfo, "LNG_LAT", data.lng_lat);
					}
				},
			})
		},
		showImage(url) {
			Vue.prototype.$previewImage(url);
		},
		pointsTable() {
			const that = this;
			//生成要点表
			uni.navigateTo({
				url: '/pages/inspect/checkPointTable?id=' + this.checkId,
				events: {
					// 为指定事件添加一个监听器，获取被打开页面传送到当前页面的数据
					yaodianbiao: function (data) {
						that.yaodianbiao = that.baseUrl + data
					}
				}
			})
		},
		resultTable(supProcess) {
			const that = this;
			uni.showActionSheet({
				itemList: ['生成结果记录表', '选择文件'],
				title: '选择操作',
				success: function (res) {
					if (res.tapIndex == 0) {
						//生成结果记录表
						if (supProcess == 'spxs' || supProcess == 'cyfw') {

							uni.navigateTo({
								url: '/pages/inspect/resultTable?id=' + that.checkId,
								events: {
									/// 为指定事件添加一个监听器，获取被打开页面传送到当前页面的数据
									yaodianbiao: function (data) {
										that.jieguojilu = that.baseUrl + data
									}
								}
							})
						} else {
							uni.navigateTo({

								url: '/pages/inspect/productionResultTable?id=' + that.checkId,
								events: {
									// 为指定事件添加一个监听器，获取被打开页面传送到当前页面的数据
									yaodianbiao: function (data) {
										that.jieguojilu = that.baseUrl + data
									}
								}
							})
						}
					} else {
						// console.log('11111', e.tempFilePaths[0])
						uni.chooseImage({
							count: 1,
							// sourceType:['camera'],
							success: (e) => {
								const uploadTask = uni.uploadFile({
									url: '/dailyInspect/uploadResultRecord', //仅为示例，非真实的接口地址
									filePath: e.tempFilePaths[0],
									name: "imgFile",
									timeout: '10000', //超时时间10秒
									formData: {
										"checkId": that.checkId,
										"type": '2'
									},
									dataType: 'json',
									success: (upRes) => {
										uni.showToast({
											title: '上传完成',
											icon: 'success'
										});
										const result = JSON.parse(upRes.data);
										if (result.code == '1') {
											uni.showModal({
												content: '保存失败,请重新尝试',
												showCancel: false
											})
										}
										that.jieguojilu = uni.$baseUrl + result
											.data;
									},
									fail(err) {
										uni.showModal({
											content: '保存失败,请重新尝试',
											showCancel: false
										})
									},
									complete() {
										uni.hideLoading()
									}
								});
							},
							fail: () => {
								uni.showToast({
									icon: 'error',
									title: '图片选择错误'
								})
							}
						})
					}
				}
			})
		},
		// 回到首页
		goBack() {
			uni.navigateBack()
		},
		checkExist(v1, v2, v3, v4) {
			//判断是否存在检查指南
			if ((v1 == undefined || v1 == '') && (v2 == undefined || v2 == '') && (v3 == undefined || v3 == '') && (
				v4 == undefined || v4 == '')) {
				return false;
			} else {
				return true;
			}
		},
		// 跳转只能客服
		robot() {
			let message = "";
			if (this.selectedContent != null && this.selectedContent != '') {
				let selectedContent = this.selectedContent;
				selectedContent = selectedContent.replace('content', "");
				let selectedContentArray = selectedContent.split(':');
				var d = this.rectificationSituationDataList.itemList[selectedContentArray[0]].contentList[
					selectedContentArray[1]];
				message = d.CHECK_CONTENT;
			}
			uni.navigateTo({
				url: '/pages/robot/robot',
				success: (res) => {
					res.eventChannel.emit('sendDefaultMessage', {
						message: message
					})
				}

			})
		},
		async signatureOne() {
			const that = this;
			//签名
			uni.navigateTo({
				url: '/pages/signature/signature',
				events: {
					updateSign(data) {
						that.sigOnePic = data;
					}
				}
			})
		},
		async signatureTwo() {
			const that = this;
			//签名
			uni.navigateTo({
				url: '/pages/signature/signature',
				events: {
					updateSign(data) {
						that.sigTwoPic = data;
					}
				}
			})
		},
		async signatureThree() {
			const that = this;
			//签名
			uni.navigateTo({
				url: '/pages/signature/signature',
				events: {
					updateSign(data) {
						that.sigThreePic = data;
					}
				}
			})
		},
		// 切换选项卡
		stepActive(index) {
			// if(this.addInspectData.companyInfo.MANAGE_STATUS == '1' && index == 1){
			// 	uni.showToast({
			// 		title:'经营异常无需维护检查内容',
			// 		icon:'none'
			// 	})
			// 	return ;
			// }
			this.stepList.forEach((item, idx) => {
				item.active = idx === index;
			});
		},
		// 基础信息选项执法人员1选择
		lawEnforcementOfficialsOne(value) {
			this.$set(this.addInspectData.superviseInfo, "checkPerson1Id", value)
			this.notificationCheckPerson1 = value;
		},
		// 基础信息选项执法人员2选择
		lawEnforcementOfficialsTwo(value) {
			this.$set(this.addInspectData.superviseInfo, "checkPerson2Id", value)
			this.notificationCheckPerson2 = value;
		},
		pointCheck() {
			const that = this;
			//进入到定位查看
			let LNG_LAT = this.addInspectData.companyInfo.LNG_LAT + "";
			uni.navigateTo({
				url: '/pages/inspect/pointCheck?lng=' + LNG_LAT.split(",")[0] + '&lat=' + LNG_LAT.split(",")[
					1],
				events: {
					// 为指定事件添加一个监听器，获取被打开页面传送到当前页面的数据
					updatePoint: function (data) {
						//重新获取企业位置信息
						that.basicInformationData();
					},
				},
			})

		},
		async showRiskContent(checkContentId) {
			//查看风险提示
			uni.showLoading({
				title: '获取信息',
				mask: true
			})
			this.checkContentRiskList = [];
			const res = await uni.$api.getRiskTypeByCheckContent({
				checkContentId: checkContentId
			})
			uni.hideLoading();
			if (res.data.code == '0') {
				this.checkContentRiskList = res.data.data;
			}
			this.$refs.riskTypePopup.open("bottom");
		},
		riskTypePopupClose() {
			this.$refs.riskTypePopup.close();
		},
		// 社会责任评分模板
		async socialResponsibility() {
			const that = this;
			let data = {
				checkId: that.checkId,
				companyId: that.companyId
			}
			const res = await uni.$api.socialResponsibilityList(data);
			this.socialResponsibilityData = res.data.data
		},
		socialResponsibilityRow(i, is) {
			this.socialResponsibilitySelectedContent = 'content' + i + ':' + is;
		},
		socialResponsibilityRowOption(i, is, option, templateId, standardId, contentId, result) {
			var d = this.socialResponsibilityData.itemList[i].contentList[is];
			this.$set(d, "SELECTION", result);
			// this.$set(d,"MISSING_ITEM_CONTENT",this.inspectionInstructionsList[0].value);
			this.loadErrorNum();
			if (result === 3) {
				if (this.socialResponsibilityData.itemList[i].contentList[is].checkMissingList.length === 1) {
					this.$set(d, "MISSING_ITEM_CONTENT", this.socialResponsibilityData.itemList[i].contentList[is]
						.checkMissingList[0].value);
				}
			} else {
				this.$set(d, "MISSING_ITEM_CONTENT", '');
			}
		},
		isAllSelected(item, option) {
			return item.contentList.every(content => content.SELECTION === option);
		},
		setAllSocialSubItems(index, option) {
			this.socialResponsibilityData.itemList[index].contentList.forEach((content, idx) => {
				this.$set(this.socialResponsibilityData.itemList[index].contentList, idx, {
					...content,
					SELECTION: option
				});
			});
			this.loadErrorNum();
			this.loadResultBtn();
		}
	}
}
</script>

<style lang="scss">
.addInspectTabsContent {
	background: #F9F9F9;
	height: calc(100vh - 195rpx);

	.upper {
		position: fixed;
		z-index: 1;
		top: 0;
		left: 0;
		width: 100%;

		.title {
			background: url('/static/img/inspectBg.png');
			background-size: cover;
			width: 100%;
			height: 115rpx;
			line-height: 115rpx;
			position: relative;
			display: flex;
			justify-content: center;

			.arrow {
				position: absolute;
				left: 33rpx;
				top: 50%;
				transform: translate(0%, -50%);
				width: 100rpx;
				height: 100rpx;

				&::before {
					display: block;
					content: "";
					position: absolute;
					top: 50%;
					left: 0%;
					width: 20rpx;
					height: 20rpx;
					border-left: 1px solid #fff;
					border-top: 1px solid #fff;
					transform: translate(0%, -50%) rotate(-45deg);
				}
			}

			text {
				font-size: 30rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				letter-spacing: 1px;
			}

			.intelligence {
				position: absolute;
				right: 30rpx;
				top: 50%;
				transform: translate(0%, -50%);
				font-size: 28rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				display: flex;

				image {
					width: 75rpx;
					height: 64rpx;
				}
			}
		}

		.step {
			display: flex;
			justify-content: space-around;
			height: 80rpx;
			line-height: 80rpx;
			background: #F9F9F9;

			view {
				position: relative;
				font-size: 25rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #999999;

				&.active {
					color: #0552A9;

					&::before {
						display: block;
						content: "";
						position: absolute;
						left: 50%;
						bottom: 0%;
						transform: translate(-50%, 0%);
						width: 100rpx;
						height: 5rpx;
						background: #0552A9;
					}
				}
			}
		}
	}

	.centre {
		margin: 195rpx 0 0 0;
		// padding: 0 17.5rpx;
		height: calc(100vh - 280rpx);
		overflow-x: hidden;

		.content-container {

			.title {
				height: 73rpx;
				line-height: 73rpx;
				background: #E1EAF4;
				display: flex;
				text-indent: 50rpx;
				font-size: 24rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #002B5B;
			}

			.addInspect {
				padding: 0 0 50rpx 0;

				.map {
					height: 80rpx;
					line-height: 80rpx;
					background: url('/static/img/map.png') no-repeat center center;
					background-size: cover;
					font-size: 23rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #002E63;
					margin: 0 auto;
					display: flex;
					align-items: center;

					image {
						width: 22rpx;
						height: 26rpx;
						margin: 0 11rpx 0 53rpx;
					}
				}

				.content {

					.text {
						font-size: 19rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #333333;
						margin: 0 auto 13rpx;
						min-height: 68rpx;
						line-height: 68rpx;
						line-height: 1.2;
						display: flex;
						align-items: center;
						padding: 10rpx 50rpx;
						background: #fff;
						justify-content: flex-start;
						flex: 1;
						white-space: nowrap;

						text {
							color: #666666;
							width: 460rpx;
							white-space: normal;
						}

						.uni-stat__select {
							width: 460rpx;

							.uni-select {
								border: none;
							}

							.uni-select__input-placeholder {
								font-size: 19rpx;
							}
						}

						.uni-date {
							width: 460rpx;

							.uni-date-editor--x {
								border: none;
							}
						}

						uni-navigator {
							display: flex;
							align-items: center;
							color: #0552A9;
						}

						&:nth-child(even) {
							background: #F9F9F9;
						}

						.topicFlex {
							display: flex;
							justify-content: flex-start;
							width: 20%;
						}

						text {
							width: 80%;
							line-height: 1.6;
						}

						.uni-select {
							padding: 0;
						}

						.uni-select__selector {
							padding: 0;
						}

						.uni-select__selector-item {
							font-size: 19rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #333333;
							padding: 5px 10px !important;
							text-align: left !important;
							line-height: 1.6 !important;
						}

						.uni-select__selector-empty {
							font-size: 19rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #333333;
						}
					}

					.two {

						.box {

							.text {

								.input-container {

									input {
										font-size: 19rpx;
									}
								}
							}
						}

					}

				}
			}

			.addInspectContent {
				padding: 0 17.5rpx 250rpx 17.5rpx;


				.positioning {
					display: flex;
					align-items: center;
					height: 56rpx;
					line-height: 56rpx;
					background: #33B97C;
					box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
					border-radius: 28rpx;
					font-size: 23rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
					margin: 14rpx auto;

					image {
						width: 22rpx;
						height: 26rpx;
						margin: 0 11rpx 0 53rpx;
					}
				}

				.box {

					.manage_status_box {
						display: flex;
						flex-direction: row;
						justify-content: flex-start;
						align-items: center;
						background: #FFFFFF;
						box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
						border-radius: 15rpx;
						padding: 23rpx 28rpx;
						margin-bottom: 20rpx;


						.manage_status_title {
							font-size: 26rpx;
						}

						.custom-radio-group {
							display: flex;
							font-size: 26rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;

							.labelRadio {
								display: flex;
								margin: 0 10rpx;
								align-items: center;

								radio {
									display: none;
								}

								&::before {
									content: '';
									width: 20rpx;
									height: 20rpx;
									line-height: 20rpx !important;
									text-align: center;
									border: 1rpx solid #979797;
									border-radius: 50%;
									font: normal normal normal 14px / 1 uni;
									font-size: 20rpx;
									color: #fff;
									margin: 0 4rpx 0 0;
								}

								&.yes::before {
									content: "\EA08";
									background-color: #07D276;
									border-color: #07D276;
								}

								&.no::before {
									content: "\00D7";
									background-color: #FF1F1F;
									border-color: #FF1F1F;
									line-height: 18rpx !important;
								}
							}
						}

						uni-navigator {
							display: flex;
							align-items: center;
							color: #0552A9;
						}

						&:nth-child(even) {
							background: #F9F9F9;
						}
					}

					.dt {
						background: #FFFFFF;
						box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
						border-radius: 15rpx;
						padding: 23rpx 28rpx;
						// position: fixed;
						width: 694rpx;
						// left:0rpx;
						// bottom: 110rpx;;
						z-index: 2;

						.h1 {
							font-size: 24rpx;
							font-family: PingFangSC-Medium, PingFang SC;
							font-weight: 500;
							color: #0552A9;
							// padding: 0 0 22rpx 0;
							// border-bottom: 2rpx solid #CECECE;
						}

						.div {
							display: flex;
							align-items: center;
							margin: 21rpx auto 0;

							.left {
								font-size: 20rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #3A3A3A;
							}

							.right {
								font-size: 20rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #686868;

								text {
									color: #DC0000;
								}

								input {
									font-size: 20rpx;
									font-family: PingFangSC-Regular, PingFang SC;
									font-weight: 400;
									color: #999999;
									width: 400rpx;
									text-indent: 10rpx;
								}

								.placeholder-class {
									color: #999999;
								}
							}

							&:last-child {
								align-items: center;
							}

							.custom-radio-group {
								display: flex;
								font-size: 26rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;

								.labelRadio {
									display: flex;
									margin: 0 10rpx;
									align-items: center;

									radio {
										display: none;
									}

									&::before {
										content: '';
										width: 20rpx;
										height: 20rpx;
										line-height: 20rpx !important;
										text-align: center;
										border: 1rpx solid #979797;
										border-radius: 50%;
										font: normal normal normal 14px / 1 uni;
										font-size: 20rpx;
										color: #fff;
										margin: 0 4rpx 0 0;
									}

									&.yes::before {
										content: "\EA08";
										background-color: #07D276;
										border-color: #07D276;
									}

									&.no::before {
										content: "\00D7";
										background-color: #FF1F1F;
										border-color: #FF1F1F;
										line-height: 18rpx !important;
									}
								}
							}
						}
					}

					.dd {

						.up {
							display: flex;
							align-items: center;
							justify-content: space-between;
							margin-top: 30rpx;
							margin-bottom: 20rpx;

							.h1 {
								font-size: 22rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #333333;
								// margin: 10rpx auto;
								text-indent: 26rpx;
								width: 50%;
							}

							.titles-right {

								.list {
									display: flex;
									align-items: center;

									.option {
										padding: 6px 17px;
										border: 1px solid #C3C3C3;
										border-radius: 2px 0 0 2px;
										font-size: 10px;
										font-family: PingFangSC-Regular, PingFang SC;
										font-weight: 400;
										color: #666666;
										background: #fff;

										&+.option {
											border-left: 0;
											border-radius: 0;
										}

										&.active {
											border: 1px solid #e3b339;
											background: #e3b339;
											color: #fff;
										}

										&:last-child {
											border-radius: 0 2px 2px 0;
										}
									}
								}
							}
						}

						.block {
							background: #FFFFFF;
							box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
							border-radius: 15rpx;
							padding: 23rpx 26rpx;

							.li {

								.uni-select__selector-item {
									font-size: 21rpx;
									font-family: PingFangSC-Regular, PingFang SC;
									font-weight: 400;
									color: #333333;
									padding: 8rpx 10px !important;
									text-align: left !important;
									height: auto !important;
									line-height: initial !important;
								}

								.uni-select__selector-empty {
									font-size: 21rpx;
									font-family: PingFangSC-Regular, PingFang SC;
									font-weight: 400;
									color: #333333;
								}

								.uni-select__input-text {
									font-size: 21rpx;
								}

								.uni-input-wrapper {
									font-size: 21rpx;
								}

								.titles {
									font-size: 22rpx;
									font-family: PingFangSC-Medium, PingFang SC;
									font-weight: 500;
									color: #353535;
									position: relative;
									display: flex;
									flex-direction: row;
									align-items: flex-start;
									justify-content: space-between;


									.titles-left {
										width: 420rpx;
										display: flex;

										text {
											color: #EF0000;
										}
									}

									text {
										margin: 0 6rpx 0 0;
									}

									&.red {

										text {
											color: #EF0000;
										}
									}

									.titles-right {
										display: flex;
										flex-direction: row;
										align-items: flex-end;
										justify-content: flex-end;
										height: 30rpx;
										margin-top: 20rpx;
									}

									.guide {
										color: #026DC6;
										display: flex;
										align-items: center;
										margin-right: 10rpx;

										image {
											width: 22rpx;
											height: 22rpx;
											margin: 0 6rpx 0 0;
										}

										.triangle {
											width: 0;
											height: 0;
											border-top: 8rpx solid transparent;
											border-bottom: 8rpx solid transparent;
											border-left: 10rpx solid #026DC6;
											top: 50%;
											right: -20rpx;
											transform: translate(-50%, -50%);
										}
									}
								}

								.optionList {
									display: flex;
									flex-direction: column;
									margin: 10px auto 0;
									align-items: flex-end;

									.list {
										display: flex;

										.option {
											padding: 12rpx 30rpx;
											border: 2rpx solid #C3C3C3;
											border-radius: 5rpx 0 0 5rpx;
											font-size: 18rpx;
											font-family: PingFangSC-Regular, PingFang SC;
											font-weight: 400;
											color: #666666;

											&:nth-child(2) {
												border-left: none;
												// border-right: none;
												border-radius: 0;
											}

											&:last-child {
												border-radius: 0 5rpx 5rpx 0;
												border-left: 0;
											}

											&.active {
												background: #E9F2FF;
												color: #0552A9;
											}
										}
									}

									.case {
										// width: 650rpx;
										width: 100%;

										.h2 {
											font-size: 16rpx;
											font-family: PingFangSC-Medium, PingFang SC;
											font-weight: 500;
											color: #353535;
											margin: 20rpx 0 6rpx 0;
										}

										input {
											margin: 20rpx auto;
											border: 2rpx solid #e5e5e5;
											// border: 2rpx solid red;
											border-radius: 6rpx;
											text-indent: 10rpx;
											font-size: 18rpx;
											padding: 16rpx 0;

											&.inspect {
												// border: 2rpx solid yellow;
												border: 2px solid #e5e5e5;
											}
										}

										.placeholder-class {
											color: red;
										}

										.placeholder-class-inspect {
											// color: yellow;
											color: #e5e5e5;
										}

										.no-realy-content {

											.rudon-component__select {
												border: 2rpx solid #e5e5e5;
												padding: 16rpx;
												width: calc(100% - 32rpx);
												border-radius: 10rpx;
											}

											.uni-stat__select {

												/deep/ .uni-select {
													height: auto;
													padding: 5px;
												}

												/deep/ .uni-select__input-box {
													height: auto;
												}

												/deep/ .uni-select__input-text {
													white-space: normal;
												}
											}
										}

										.uni-select {
											height: auto;
											padding: 5px;
										}

										.uni-select__input-box {
											height: auto;
										}

										.uni-select__input-text {
											white-space: normal;
										}
									}
								}

								&+.li {
									margin: 20rpx auto 0;

									.title {

										// text {
										// 	color: #353535;
										// }
									}
								}
							}
						}

						&:last-child {
							padding: 0 0 150rpx 0;
						}
					}
				}

				.list {

					.li {
						.h1 {
							font-size: 11px;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #333333;
							margin: 5px auto;
							text-indent: 13px;
						}

						.box {
							background: #FFFFFF;
							box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
							border-radius: 15rpx;
							padding: 23rpx 26rpx;

							.row {

								&+.row {
									margin: 10px auto 0;
								}

								.titles {

									.text {
										font-size: 11px;
										font-family: PingFangSC-Medium, PingFang SC;
										font-weight: 500;
										color: #353535;
										position: relative;
										display: flex;
										flex-direction: row;
										align-items: flex-start;
										justify-content: space-between;

									}
								}

								.optionList {
									display: flex;
									flex-direction: column;
									margin: 10px auto 0;
									align-items: flex-end;

									.list {
										display: flex;

										.option {
											padding: 6px 15px;
											border: 1px solid #C3C3C3;
											border-radius: 2px 0 0 2px;
											font-size: 9px;
											font-family: PingFangSC-Regular, PingFang SC;
											font-weight: 400;
											color: #666666;

											&.active {
												background: #E9F2FF;
												color: #0552A9;
											}
										}
									}
								}
							}
						}
					}
				}
			}

			.addInspectTrisk {
				padding: 0 17.5rpx;

				.positioning {
					display: flex;
					align-items: center;
					height: 56rpx;
					line-height: 56rpx;
					background: #33B97C;
					box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
					border-radius: 28rpx;
					font-size: 23rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
					margin: 14rpx auto;

					image {
						width: 22rpx;
						height: 26rpx;
						margin: 0 11rpx 0 53rpx;
					}
				}

				.box {
					border-top: 2rpx solid #D6D6D6;

					.div {
						display: flex;
						align-items: center;
						justify-content: flex-start;
						min-height: 68rpx;
						line-height: 68rpx;
						font-size: 21rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #333333;
						border-left: 2rpx solid #D6D6D6;
						border-right: 2rpx solid #D6D6D6;
						border-bottom: 2rpx solid #D6D6D6;

						.title {
							width: 199rpx;
							text-indent: 45rpx;
							border-right: 2rpx solid #D6D6D6;
						}

						.titles {
							width: 199rpx;
							text-indent: 45rpx;
							border-right: 2rpx solid #D6D6D6;
						}

						.state {
							width: 307rpx;
							text-align: left;
							text-indent: 88rpx;
							border-right: 2rpx solid #D6D6D6;
							display: flex;
							align-items: center;

							.yes {
								color: #333333;
							}

							.no {
								color: #FF2A2A;

								image {
									width: 21rpx;
									height: 21rpx;
									margin: 0 0 0 10rpx;
								}
							}
						}

						.details {
							width: 206rpx;
							height: 100%;
							text-align: center;
							color: #0552A9;
						}

						&:nth-child(even) {
							background: #F9F9F9;
						}
					}

					.determine {
						display: none;
						width: 80%;
						margin: 30rpx auto 0;
						height: 55rpx;
						line-height: 55rpx;
						background: #0552A9;
						border-radius: 10rpx;
						font-size: 20rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #fff;
						text-align: center;
					}

					.illustrate {
						padding: 16rpx 24rpx;

						.titles {
							font-size: 20rpx;
							font-family: PingFangSC-Medium, PingFang SC;
							font-weight: 500;
							color: #333333;
						}

						.content {
							font-size: 20rpx;
							padding-bottom: 20px;
							color: #666666;
						}
					}
				}
			}
		}

		.fixed {
			position: fixed;
			left: 0;
			bottom: 0;
			height: 92rpx;
			background: #fff;
			padding: 0 95rpx 24rpx 95rpx;
			margin: 0 auto;
			display: flex;
			align-items: center;
			width: calc(100% - 190rpx);

			button {
				width: 269rpx;
				height: 55rpx;
				line-height: 55rpx;
				background: #0552A9;
				border-radius: 10rpx;
				font-size: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;

				&.determine {
					color: #fff;
				}

				&.cancellation {
					display: none;
					background: none;
					border: 1rpx solid #979797;
					color: #979797;
				}
			}
		}
	}

	.facadePhotoPopupContent,
	.noticeFormPopupContent,
	.riskReminderDetailsContent,
	.taskAssociationContent,
	.riskWarningPopupContent,
	.inspectionGuidelinesContent {
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 0 0;

		.title {
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			background: url('/static/img/popupTitle.png') no-repeat center center;
			background-size: cover;
			font-size: 25rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			// text-indent: 45rpx;
			text-align: center;
		}

		.box {
			padding: 45rpx 30rpx;

			.image-list {
				display: flex;
				flex-wrap: wrap;
				justify-content: flex-start;

				.image-item {
					position: relative;
					width: 212rpx;
					height: 212rpx;
					overflow: hidden;
					border-radius: 20rpx;
					margin: 0 25rpx 25rpx 0;

					&:nth-child(3n) {
						margin: 0 0 25rpx 0;
					}

					.itemImg {
						width: 100%;
						border-radius: 20rpx;
					}

					.delete {
						position: absolute;
						top: 16rpx;
						right: 16rpx;
						width: 20rpx;
						height: 20rpx;
					}
				}

				.upload {
					width: 212rpx;
					height: 212rpx;
					background: url('/static/img/upload.png') no-repeat center center;
					background-size: cover;
					padding: 0;
					margin: 0;
				}

			}

			.div {
				display: flex;
				align-items: center;
				justify-content: flex-start;
				min-height: 68rpx;
				line-height: 68rpx;
				font-size: 21rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				border-bottom: 2rpx solid #D6D6D6;

				.titles {
					width: 199rpx;
					text-indent: 45rpx;
					border-right: 2rpx solid #D6D6D6;
				}

				.state {
					width: 307rpx;
					text-align: left;
					text-indent: 88rpx;
					border-right: 2rpx solid #D6D6D6;
					display: flex;
					align-items: center;

					.yes {
						color: #333333;
					}

					.no {
						color: #FF2A2A;

						image {
							width: 21rpx;
							height: 21rpx;
							margin: 0 0 0 10rpx;
						}
					}
				}

				.details {
					width: 206rpx;
					height: 100%;
					text-align: center;
					color: #0552A9;
				}

				&:nth-child(even) {
					background: #F9F9F9;
				}
			}

			.dt {
				font-size: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #FF4242;
				text-align: center;
				margin: 26rpx auto 0;
			}

			.dd {
				display: flex;
				align-items: center;
				border-bottom: 2rpx solid #D6D6D6;
				font-size: 21rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				border-top: 2rpx solid #D6D6D6;
				border-left: 2rpx solid #D6D6D6;
				border-right: 2rpx solid #D6D6D6;

				.uni-checkbox-input {
					width: 20rpx;
					height: 20rpx;
					margin: 0 12.5rpx 0 32rpx;
					border-radius: 0;
					border-color: #0552A9;
				}

				.uni-checkbox-input-checked {
					background: #0552A9;

					&::before {
						color: #fff;
						font-size: 16rpx;
					}
				}

				>view {

					&:nth-child(1) {
						width: 95rpx;
						height: 68rpx;
						line-height: 68rpx;
						text-align: center;
						border-right: 2rpx solid #D6D6D6;
					}

					&:nth-child(2) {
						width: 410rpx;
						height: 68rpx;
						line-height: 68rpx;
						text-align: left;
						border-right: 2rpx solid #D6D6D6;
						text-indent: 2em;
					}

					&:nth-child(3) {}
				}

				&+.dd {
					border-top: none;
				}
			}
		}

		.button {
			margin: 58rpx auto 0;
			padding: 0 95rpx 24rpx 95rpx;
			display: flex;

			button {
				width: 269rpx;
				height: 55rpx;
				line-height: 55rpx;
				background: #0552A9;
				border-radius: 10rpx;
				font-size: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;

				&.determine {
					color: #fff;
				}

				&.cancellation {
					background: none;
					border: 1rpx solid #979797;
					color: #979797;
				}
			}
		}
	}

	.noticeFormPopupContent {

		.h1Title {
			font-size: 26rpx;
			margin: 20rpx auto 0;
			text-align: center;
		}

		.h2Ttitle {
			font-size: 30rpx;
			text-align: center;
		}

		.box {
			padding: 45rpx 30rpx;
			height: 400px;
			overflow-x: hidden;

			.div {
				border-top: 2rpx solid #D6D6D6;
				border-left: 2rpx solid #D6D6D6;
				border-right: 2rpx solid #D6D6D6;
				line-height: initial;
				height: initial;
				min-height: 82rpx;
				position: relative;

				&::before {
					content: "";
					display: block;
					width: 2rpx;
					height: 100%;
					background: #D6D6D6;
					position: absolute;
					top: 50%;
					left: 229rpx;
					transform: translate(-50%, -50%);
				}

				.titles {
					width: 229rpx;
					line-height: 1.2;
					height: 100%;
					display: flex;
					flex-direction: column;
					justify-content: center;
					margin: 0 20rpx 0 0;
					border-right: 0;
				}

				.textarea {
					width: 50%;
					padding: 10rpx 0;
				}

				input {
					font-size: 21rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					width: 460rpx;
					text-indent: 20rpx;
				}

				.value {
					font-size: 21rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					width: 460rpx;
					text-indent: 20rpx;
				}

				.placeholder-class {
					color: #999999;
				}

				.uni-stat__select {
					width: 460rpx;

					.uni-select {
						border: none;
					}
				}

				.uni-date {
					width: 460rpx;

					.uni-date-editor--x {
						border: none;
					}
				}

				&+.div {
					border-top: none;
				}
			}
		}
	}

	.riskReminderDetailsContent {

		.illustrate {

			.titles {
				font-size: 20rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #333333;
			}

			.content {
				font-size: 20rpx;
				color: #666666;
				padding: 10px 0px;
			}
		}

		.button {
			margin: 58rpx auto 0;
			padding: 0 95rpx 24rpx 95rpx;
			display: flex;

			button {
				width: 269rpx;
				height: 55rpx;
				line-height: 55rpx;
				background: #0552A9;
				border-radius: 10rpx;
				font-size: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;

				&.determine {
					color: #fff;
				}

				&.cancellation {
					background: none;
					border: 1rpx solid #979797;
					color: #979797;
				}
			}
		}

		.closeReturn {
			width: 80%;
			margin: 30rpx auto 0;
			height: 55rpx;
			line-height: 55rpx;
			background: #0552A9;
			border-radius: 10rpx;
			font-size: 20rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #fff;
			text-align: center;
			position: relative;
			top: -30rpx;
		}
	}

	.riskWarningPopupContent {

		.box {
			height: 60vh;
			overflow-x: hidden;

			.div {
				border-top: 2rpx solid #D6D6D6;
				border-left: 2rpx solid #D6D6D6;
				border-right: 2rpx solid #D6D6D6;

				&+.div {
					border-top: none;
				}
			}

			.illustrate {
				padding: 16rpx 24rpx;

				.titles {
					font-size: 20rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #333333;
				}

				.content {
					font-size: 20rpx;
					color: #666666;
				}
			}

			.buttonBg {
				width: 700rpx;
				margin-top: 30rpx;
				background: #fff;

				.determine {
					width: 80%;
					margin: 30rpx auto 0;
					height: 55rpx;
					line-height: 55rpx;
					background: #0552A9;
					border-radius: 10rpx;
					font-size: 20rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #fff;
					text-align: center;
				}
			}
		}
	}

	.inspectionGuidelinesContent {

		.box {

			.div {

				border-top: 2rpx solid #D6D6D6;
				border-left: 2rpx solid #D6D6D6;
				border-right: 2rpx solid #D6D6D6;

				&+.div {
					border-top: none;
				}

				.contents {
					text-indent: 20rpx;
				}
			}

			.closeReturn {
				width: 80%;
				margin: 30rpx auto 0;
				height: 55rpx;
				line-height: 55rpx;
				background: #0552A9;
				border-radius: 10rpx;
				font-size: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #fff;
				text-align: center;
			}
		}
	}
}

.no-realy-content {
	// display: flex;
	// flex-direction: row;
	// justify-content: space-between;
	// align-items: center;
	// // width: 650rpx;
	// width: 100%;
	display: flex;
	align-items: flex-end;
	width: 100%;
	flex-direction: column;
	justify-content: space-between;

	.rudon-select__input-box {
		font-size: 21rpx;
	}

	.rudon-select__selector-item {
		font-size: 21rpx;
		padding: 0 !important;
	}

	.uni-icons::before {
		font-size: 21rpx;
	}
}


.uni-select__input-text {
	font-size: 18rpx;
}

.content-upload-btn {
	margin-left: 20px;
	border: 0px;
	border-radius: 7px;
	background-color: #e3b339;
	color: #ffffff;
	padding: 6px 15px;
	font-size: 20rpx;
}

.content-upload-btn-realy {
	background-color: #1da247;
	margin-left: 20px;
	border: 0px;
	border-radius: 7px;
	color: #ffffff;
	padding: 6px 15px;
	font-size: 20rpx;
}

.upload-btn {
	width: 76px;
	height: 32px;
	border-radius: 7px;
	background-color: #026DC6;
	color: #ffffff;
	font-size: 11px;
}


.popupContent,
.popupContentTwo {
	background: #FFFFFF;
	border-radius: 20rpx 20rpx 0 0;

	.title {
		width: 100%;
		height: 80rpx;
		line-height: 80rpx;
		background: url('/static/img/popupTitle.png') no-repeat center center;
		background-size: cover;
		font-size: 25rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		// text-indent: 45rpx;
		text-align: center;
	}

	.box {
		text-align: center;
		margin: 50rpx auto;
	}

	.button {
		margin: 58rpx auto 0;
		display: flex;
		justify-content: space-around;
		align-items: center;

		button {
			width: 269rpx;
			height: 55rpx;
			line-height: 55rpx;
			background: #0552A9;
			border-radius: 10rpx;
			font-size: 20rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;

			&.determine {
				color: #fff;
			}

			&.cancellation {
				background: none;
				border: 1rpx solid #979797;
				color: #979797;
			}
		}
	}
}

.sig-image {
	width: 100px;
	height: 50px;
	margin-left: 20px;
}

.item-text {
	line-height: 30px;
}

.box-item {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: flex-start;
	padding: 0px 14px;

}

.box-item-left {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: flex-start;
	font-size: 24rpx
}

.btna {
	font-size: 24rpx;
	color: #0055ff;
	line-height: 24rpx;
}

.location-status {
	font-size: 24rpx;
	color: #07D276;
	text-align: center;
}

.location-active {
	font-size: 24rpx;
	color: #d22741;
	text-align: center;
}

.custom-radio-group {
	display: flex;

	.labelRadio {
		display: flex;
		margin: 0 10rpx;
		align-items: center;
	}

	.uni-radio-input {
		width: 20rpx;
		height: 20rpx;
		border: 1rpx solid #979797;
	}

	.yes {

		.uni-radio-input {
			background: #07D276 !important;
			border-color: #07D276 !important;

			&::before {
				background: #07D276;
				border-radius: 50%;
				font-size: 16rpx;
			}
		}
	}

	.no {

		.uni-radio-input {
			background: #FF1F1F !important;
			border-color: #FF1F1F !important;
			position: relative;
			transform: rotate(45deg);

			&::before {
				content: "";
				position: absolute;
				top: 50%;
				left: 50%;
				background-color: #fff;
				width: 2rpx;
				height: 60%;
				transform: translate(-50%, -50%);
			}

			&::after {
				content: "";
				position: absolute;
				top: 50%;
				left: 50%;
				background-color: #fff;
				width: 60%;
				height: 2rpx;
				transform: translate(-50%, -50%);
			}
		}
	}
}

.abnormal {
	background: #FFFFFF;
	box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
	border-radius: 15rpx;
	padding: 23rpx 28rpx;
	margin-bottom: 20rpx;


	.block {
		.text {
			display: flex;
			flex-direction: row;
			justify-items: flex-start;
			align-items: center;
			padding: 23rpx 0rpx;

			.topicFlex {
				display: flex;
				justify-content: flex-start;
				width: 26%;
				font-size: 24rpx;
			}

			.uni-stat__select {
				width: 460rpx;

				.uni-select {
					// border: none;
					// padding: 0;
				}

				.uni-select__input-placeholder {
					font-size: 19rpx;
				}

				.uni-select__selector {
					// padding: 0;
				}

				.uni-select__selector-item {
					font-size: 19rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
					padding: 5px 10px !important;
					text-align: left !important;
					line-height: 1.6 !important;
				}

				.uni-select__selector-empty {
					font-size: 19rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
				}
			}

			.div {
				display: flex;
				flex-direction: column;
				line-height: initial;
			}

			text {
				font-size: 24rpx;
			}
		}
	}
}

.three {
	background: #FFFFFF;
	box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
	border-radius: 15rpx;
	padding: 23rpx 28rpx;
	margin-bottom: 20rpx;

	.box {

		.text {
			display: flex;
			flex-direction: row;
			align-items: flex-start;
			justify-content: flex-start;

			view {
				color: #1e4de6
			}
		}

		.facadePhoto {
			height: 150px;
			font-size: 26rpx;

			image {
				width: 100rpx;
				height: 100rpx;
			}
		}
	}
}

.text-red {
	color: #e11515;
}

.float-border {
	// border:1px solid red;
	padding: 20rpx;
	// overflow: hidden;
	box-shadow: 0px 0px 15rpx 6rpx rgba(147, 142, 213, 0.5);
	transition: box-shadow 0.3s ease;
	border-radius: 10rpx;
}

.input-text {
	font-size: 19rpx;
	font-family: PingFangSC-Regular, PingFang SC;
	font-weight: 400;
	color: #333333;
	min-height: 48rpx;
	line-height: 48rpx;
	line-height: 1.2;
	display: flex;
	align-items: center;
	padding: 0rpx 30rpx 10px 30x;
	background: #fff;
	justify-content: flex-start;
	flex: 1;
	white-space: nowrap;
}

.input-text-place {
	font-size: 19rpx;
	font-family: PingFangSC-Regular, PingFang SC;
	font-weight: 400;
	color: #333333;
	margin: 0 auto 13rpx;
	white-space: nowrap;
}

.problem {
	width: 100%;
	border: 1px solid #D6D6D6;
	margin-top: 10px;
}

.global-options {
	display: flex;
	align-items: center;
	text-indent: 0;
}

.global-options .option {
	padding: 6px 17px;
	border: 1px solid #C3C3C3;
	border-radius: 2px 0 0 2px;
	font-size: 10px;
	font-family: PingFangSC-Regular, PingFang SC;
	font-weight: 400;
	color: #666666;
	background: #fff;
}

.global-options .option.active {
	border: 1px solid #e3b339;
	background: #e3b339;
	color: #fff;
}
</style>